Widget and Record Producer

david_legrand
Kilo Sage

Hi,

I would like to know if we have Documentation about Helsinki Service Portal limitations and best practices, specially when building Widgets for Record Producers?

For example, in the CMS, I was able to create a UI Page to have a "complex variable with dynamic number of rows", when we submit, the data are sent to a string field using a client script and in our Record Producer script, we were able to use this string field to create the corresponding records.

find_real_file.png

We are trying to build the same feature with Widget (as UI Pages don't display on Service Portal) but we don't succeed to retrieve the data when we submit the record producer.

I looked in Service Portal examples (HR...) but didn't see anywhere an example where data are retrieved from a Widget and used by a Record Producer script.

Apart these technical issues, the customer and us love the new Service Portal

cc: nathanfirth, ctomasi

cc:Developer Community

1 ACCEPTED SOLUTION

In record producers and catalog items you can also embed a Service Portal widget which could be used to accomplish the multiple rows as shown above.


View solution in original post

16 REPLIES 16

ianr
Kilo Contributor

"In record producers ... you can also embed a Service Portal widget..." - can you tell how (or point to some documentation)?


One of my colleagues succeeded to create the widget (I'll mark the question answered), it's not so hard when you understand the logic and angular.js.



For embedding widget into record producer, you just need to create a variable and on the variable form to fill the field "widget"


Ah, thanks! It was still puzzling me, until I finally realized that "Widget" is a field in the Default Value" panel. Wouldn't have expected that.


Jason_Lewko
ServiceNow Employee
ServiceNow Employee

To save others a bit of time hunting around for the "Widget" reference field, you set the "Type" field to "Macro" and then you'll see the "Widget" field displayed on the "Default Value" tab.


Hi David,



Can you please provide a little more clarity,


If i create a widget and embed it into a record producer variable, how is data from the widget returned back into the variable?



thanks