Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Service portal widgets, how do I use fields rather than options schema to pass through variables e.g. Data table widget passes through the table to query against?

andyfrost01
Kilo Explorer

Hi,

I'm having issues with the difference between options schema and data table with Fields to pass through parameters. Please see the below example.

When I click to edit the widget on the service portal page designer i get presented with the following options which i have created in the options schema and can access using options.title etc.

But i would like to know how to pass through Fields as options e.g. Data table, bootstrap color, glyph etc just like the data table widget does.

when i try and change my widget to a instance with table and add the table to the fields it doesn't appear in the options to select a table.

Hopefully that makes sense and one of you guys can explain the differences and how i can make the most of the field options as i can't seem to find any documentation on this but there is plenty on the options schema.

fieldsOptions.PNG

Any information would be great appreciated.

Cheers

Andy

2 REPLIES 2

larstange
Mega Sage

Hi



go to Service Portal -> Widgets and open the widget record.



Then add all the data table fields that you need available as options, in the "Field" list field



find_real_file.png


Hi Lars, thanks for your answer.



I'm doing that but only some get displayed.



as you can only title and bootstrap size are getting displayed.


example.PNG


OptionsSchemaOptions.PNG