- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2025 05:41 AM
Hello everyone,
I need a description in my ritm which should same like as catalog item description. When i used dot walk for it in my flow designer i am getting the description with html tags in ritm description.
Could you please share how can i proceed with that , if script need for can you please provide the script for it.
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2025 06:19 AM
Catalog item description field is HTML type, RITM description field is String type
so you will have to strip the HTML tags and then add
Do this
1) create a flow variable of type String
2) then use Set Flow Variable logic and strip the HTML tags using script and set in that flow variable
var itemDescription = fd_data.trigger.request_item.description.toString();
itemDescription = itemDescription.replace(/<[^>]*>/g, '');
return itemDescription;
3) then use "Update Record" flow action and use this flow variable to set the RITM->Description
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2025 06:23 AM
Hello @venkyk1309 ,
Yeah , you can use script insted of dot walk to set the description same as Cat Item by removing the HTML tags, just use the code below for besides desc ....
var catItem = fd_data.trigger.request_item.cat_item;
var desc = catItem.description;
// Strip HTML tags from the description
if (desc) {
var strippedDesc = desc.replace(/<[^>]*>/g, '').trim();
return strippedDesc;
}
return '';
Final Output:
this will work just fine, I just tested the same and also let me know if you are able to see the Screenshots or not if you face any issues, seems like there is been the issue with screenshots ....
🔹 Please mark ✅ Correct if this solves your query, and 👍 Helpful if you found the response valuable.
Best regards,
Aniket Chavan
🏆 ServiceNow MVP 2025 | 🌟 ServiceNow Rising Star 2024
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2025 06:05 AM - edited 07-25-2025 06:09 AM
@venkyk1309,
Use below script to avoid HTML tags:
var ritm = new GlideRecord('sc_req_item');
if (ritm.get(fd_data.trigger.request_item.sys_id)) {
var catItem = ritm.cat_item.getRefRecord(); // dot-walk to catalog item
if (catItem && catItem.description) {
var strippedDescription = catItem.description.replace(/<[^>]*>?/gm, ''); // Remove HTML tags
return strippedDescription;
}
}
Please mark my response as Accepted and Helpful for future references.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2025 06:19 AM
Catalog item description field is HTML type, RITM description field is String type
so you will have to strip the HTML tags and then add
Do this
1) create a flow variable of type String
2) then use Set Flow Variable logic and strip the HTML tags using script and set in that flow variable
var itemDescription = fd_data.trigger.request_item.description.toString();
itemDescription = itemDescription.replace(/<[^>]*>/g, '');
return itemDescription;
3) then use "Update Record" flow action and use this flow variable to set the RITM->Description
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2025 08:14 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2025 11:49 PM
@Ankur Bawiskar
Thankyou for your response
In my case i need a catalog item description you have give description of request_item.description
I got my solution Ankur thank you for your response that also helped me in other way
Have a good day...!
Regards,
Venkatesh