Regarding flow designer

venkyk1309
Tera Contributor

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.

2 ACCEPTED SOLUTIONS

Ankur Bawiskar
Tera Patron
Tera Patron

@venkyk1309 

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

AnkurBawiskar_1-1753449402990.png

 

AnkurBawiskar_2-1753449430645.png

 

2) then use Set Flow Variable logic and strip the HTML tags using script and set in that flow variable

AnkurBawiskar_0-1753449346371.png

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

AnkurBawiskar_3-1753449589770.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

Aniket Chavan
Tera Sage
Tera Sage

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 '';

AniketChavan_1-1753449673146.png

 

 

AniketChavan_0-1753449646241.png

 

Final Output:

AniketChavan_2-1753449714942.png

 

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

 

View solution in original post

7 REPLIES 7

Aniket Chavan
Tera Sage
Tera Sage

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 '';

AniketChavan_1-1753449673146.png

 

 

AniketChavan_0-1753449646241.png

 

Final Output:

AniketChavan_2-1753449714942.png

 

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

 

Hello @Aniket Chavan ,

It is working fine, if the caller language is English if the caller language is different (Dutch, German, French) it is not working still we are getting in English description only.

Thanks

venkyk1309
Tera Contributor

Hello @Aniket Chavan 

I have used the script which you have provided it is working fine for the user whose language is English, the description is auto populating in English itself. While the user language is not English means (German, French, Dutch) the description field is populating in English only.

Note: 1. My maintain item is translated and it has translated texts as well.
2. When i impersonated the user, whose language is not English i can in the portal the description is visible in their language.