Populate Catalog Item Variable Values via Script Include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2022 10:25 AM
We have a custom table with the following tables:
Active | Job Code | Job Title | Catalog Item | Variables |
true | A3124 | Senior Analyst | SharePoint | 'variables':{ "vURL": "https://sharepoint.com/teams/eshare/_layouts/15/people.aspx?", "AccessLevel": "1", "AccessTypes": "Contributor", "Groups":"8b7eacef1b3681509157b95e034bcb2d,c08ea8631b7681509157b95e034bcb60"} |
true | A3124 | Senior Analyst | MS Teams | 'variables':{ "AccessType": "Analyst, IT", "Region": "Asia/Pacific", "Groups":"8b7eacef1b3681509fsdfs34bcb2d,c08ea8631b76646131319e034bcb60"} |
When a new user is created with the given job code, create a new request using the catalog items in the given record and populate the catalog item variables with the defined values in the "Variables" column.
I have been trying to get the variable values populated, but ritms are coming in as blank.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2022 07:05 PM
Hi,
I'd recommend using logs to help you troubleshoot (such as gs.info()).
Currently, it looks like you're just coding in the dark and having those log entries would help you see values for things such as:
-
currentObject.u_requested_for
currentObject.u_requested_for.u_job_code
- And then checking your parsed JSON:
var object = json.parse(RITMVals);​
This should help you identify any issues, allowing you to correct anything that's wrong.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!