Record Producer

Snehal
Tera Expert

Hi Team,

I have one record producer tile on employee centre portal called "report a facilities issue "and in that i have question called "Which Service is impacted" it is selected box field and listed some services example Acces & drinking tap and after selecting the service let's say Access so related questions  will be populate so i have configured ui polices for that but now requirement is there are some categories aligned so lets say one category is Access and Security this is a tile  under this tile i want to tag the "report a tech issue tile" which is a record producer and if i click on that tile "Which Service is impacted" field should be filled with "Access"value automatically and according to corresopnding fields should populated for which i set up by ui policies similary with the other service (drinking tab ) also 

can anyone suggest me how to achieve this..

 

Attaching some screenshots 

Help will be much appreaciated !

Thank You!

1 REPLY 1

Brad Warman
Giga Sage

Take a look at this great article on SNGuru - https://servicenowguru.com/client-scripts-scripting/parse-url-parameters-client-script/

 

You can use an onload script to pull in a URL parameter to fill the relevant field when the record producer loads. Make sure to use the second function called getParameterValue(name) from the example otherwise it won't work in the service portal.

 

BradWarman_0-1723157089609.png

 

Once you have the onload script working, you can create a content item using the URL of the record producer but add your URL parameter to the end (eg. &sysparm_myparameter=Value of choice). The onload script will then find this parameter and put the value into the field.