- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-07-2025 10:29 PM
Hello Team,
I am trying to extract content users have input in the additional column of a catalog item into a report. Please note the variable is HTML type and its not mapped to any field
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-07-2025 10:54 PM
@Community Alums If you're just exploring values, run this in Background Scripts to verify.
var gr = new GlideRecord('sc_req_item');
gr.query();
while (gr.next()) {
var htmlVar = gr.variables.additional_info; // Replace with your variable name
if (htmlVar) {
gs.print('Requested Item: ' + gr.number + ' | HTML Content: ' + htmlVar.toString());
}
}
OR you can create REPORT on a variable via the sc_item_option_mtom table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-07-2025 10:58 PM
Hi @Community Alums ,
It's going to look like this with html tags
better create one more variable which replaces html tags with just the content and use that variable
to extract text form html you can refer below
https://www.servicenow.com/community/developer-forum/glideelement-get-html-text-content/m-p/1985802
https://www.servicenow.com/community/developer-forum/extract-text-from-knowledge/m-p/2130955
https://www.servicenow.com/community/csm-forum/remove-html-tags/m-p/3231949
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya