In Portal Unable to see HTML variable after submitting the catalog.

Ak8977
Tera Expert

I have one variable of HTML type. After submitting the request I am unable to see the variable in the catalog variable section in form in Portal level. How I can fix this issue. Is there any workaround for it like converting html to string type during submitting the request. If yes how I can do it.
thanks,

6 REPLIES 6

Anil Lande
Kilo Patron

Hi,

Please check below knowledge article:

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0820434

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Hello @Anil Lande ,
I don;t want to edit widget. I would lie to convert it into string type.
Is it possible. If yes How I can do it

 

You can create one 'Multi Line text' variable field and make it hidden on catalog Form using UI Policy. 

Create onSubmit client script and set the value of HTML filed to string field.

in OnSubmit client script you can write:

 

var htmlInput = g_form.getValue('html_var_name');

g_form.setValue('multi_line_variable_name',htmlInput);

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Hello @Anil Lande , 
I already tried it. It was not working.