Add a Prompt to the Consume a Consumable UI

Adam Wood
Tera Contributor

Hi 

 

 

We have a requirement to enter extra information when we click the consume button.

 

I would like to the add the option to the UI Page (consume_a_consumable) to enter a number and add the results to a field on the consumable

 

I have managed to add this to the UI page but have been unable to update the consumable with this number

 

AdamWood_0-1743097636486.png

 

Any help would be appreciated 

 

Thank you 

 

 

6 REPLIES 6

@Adam Wood 

As mentioned by me on Friday, were you able to send the samticket to that script include function?

Also did you update that script include function to accept the extra parameter and update the field?

did you get samticket in processing script?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thanks adam, "samticket" will be JavaScript variable accessing in the processing script.

 

You can't just update the splitForeground functions arguments unless you've also updated the script include.

 

You should be able to update the userDetails object as this updates fields on the asset record.

 

To the object, add the key as the field you want to update, and the value as the variable. 

 

So below line 8 where the company key value is declared add

 

sam_ticket_field : samticket

 

Replace sam_ticket_field with the field name