Displaying a table on a Catalog Item using the HTML variable.

gregdormon
Kilo Contributor

Hi all,

Currently I'm creating a Catalog Item for a Firewall Access request. Rather than using multiple variable sets of 6 multi line text fields and catalog policies to show/hide those fields, I figured creating a table would be much easier. Creating the table was pretty straight forward however on the Catalog Item, the toolbar and border are still displaying allowing the table to be editied which I do not want.

find_real_file.png

The table is somewhat rudimentary but I want to know if there's a way to hide the toolbar and border? This would make it so that just the table itself is displayed AND allowed to be typed into. My first guess would be that the DOM can be manipulated but I'd rather not do this...

Any suggestions?

Greg

16 REPLIES 16

lsoileau
Mega Contributor

Cindy,


Could you share your code for getting the table entries into the multi-line text variable?


Thanks,


Lida


Hi Greg,



You can write this as 'onLoad' script in 'catalog client script', if you want it to apply on a particular catalog Item.



Thanks,


Shivam



PS : mark the answer Helpful, if it helps you.


shivam_singhal
ServiceNow Employee
ServiceNow Employee

Hi Greg,



To make this functionality, better option is to create a UI Macro.
1. Create a UI Macro, Apply css according to your need


Screen Shot 2016-10-07 at 12.32.35 PM.png



2. Apply that UI macro to the catalog Item.



3.


Screen Shot 2016-10-07 at 12.34.49 PM.png



Thanks,
Shivam



PS: Mark Correct/Helpful /Like based on the effect of response.


Hi Shivam,



Just wondering how you are getting values in this table? Are these dynamic values based on some previous variable values selection on your catalog item or they are static?



if dynamic, can you please share your code?



Thanks


Jyo


This is for creating a table of text fields.