We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to extract information from additional information column of a catalog item

Not applicable

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 

1 ACCEPTED SOLUTION

Nilesh Pol
Kilo Sage

@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

View solution in original post

5 REPLIES 5

Chaitanya ILCR
Giga Patron

Hi @Community Alums ,

It's going to look like this with html tags

ChaitanyaILCR_0-1746683695803.png

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