How to convert HTML field value to String value for Description field from catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 08:33 AM
Hi,
URGENT : I have a business rule for to populate description field from catalog item to service request form. but the problem is the description field from catalog item is html type so when i populate it in service request form it is showing value in html form. could anyone help me how to resolve this? what script should i add on to this?
provided the BR i used below

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 08:39 AM
@SM123 In your business rule replace line number 8 with the following code and let me know if it works.
current.description = gr.cat_item.description.replace(/<\/?[^>]+(>|$)/g, "");
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 08:45 AM
@SM123 this should work for your requirement.
@Sandeep Rajput Appreciate your quick response 👏
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 09:04 AM
Hi, @Sandeep Rajput
Thank you.. You almost resolved my issue but i'm facing issue with spacing for some catalog item's description. i provided the ss below. Please help me with this.. your help is much appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 12:59 AM
@SM123 please try to trim the description and let me know, if still the same.
current.description = current.description.trim();