Catalog Builder - Variables in SCTASK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 12:04 PM
Hello all,
I am back with another question. I have a catalog item that 'User 1' fills out and is sent to 'User 2' to process. On the catalog item, I have hidden fields that 'User 2' will fill out. Currently, it's set up so when 'User 2' goes in to the RITM, they can fill out those extra fields.
What I am trying to accomplish is, rather than forcing 'User 2' to go in to the RITM to fill out the fields, and then go in to the Catalog Task to mark the item complete, can I have the fields appear in the corresponding Catalog Task? That way, 'User 2' can fill out the fields and mark it complete all from one screen?
I know I can set it up so whatever is filled in on the catalog task and appears in the RITM, can be copied down to the SCTASK, but I'd like for fields filled in on the SCTASK to flow back up in to the RITM. Is this possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 11:34 PM
To pass variables from SCTASK to RITM in ServiceNow, you can use the following approach:
- Create a variable in the catalog item and hide it from the catalog item form.
- Show the same field on the RITM and SCTASK forms as mandatory via Catalog UI Policy.
- Use a business rule or script to copy the values from the SCTASK to the RITM.
Here is an example of how you can achieve this:
Create a variable in the catalog item:
- Go to the catalog item form.
- Add a new variable and configure it as needed.
- Set the variable to be hidden from the catalog item form.
Show the variable on the RITM and SCTASK forms:
- Go to the RITM and SCTASK forms.
- Configure the form layout and add the variable field to the form.
- Make the field mandatory using Catalog UI Policy.
Copy the variable value from SCTASK to RITM:
- Create a business rule or script to copy the value from the SCTASK to the RITM.
- Use the GlideRecord API to query the SCTASK and RITM records.
- Get the value of the variable from the SCTASK and set it in the corresponding field of the RITM.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 12:58 PM
Would this be an accurate re-wording of your response?:
"No, there isn't any way to accomplish this through the Catalog Builder. However, you could accomplish this by....."