How to create variables associated with a Standard Change request using API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2022 11:30 AM
I am trying to use the SN API to work with and create standard changes that have a Variable Set associated with them that stores variables/info about the request.
I have been able to locate the variables I need from the question_answer table, however, there does not, so far, appear to be a way to populate those variables using the SN APIs. I can query the values but cannot populate them. I tried submitting the variables in json as part of the request to create the CHG but they still do not get populated, even though the CHG is created successfully. Any thoughts how to create those variables outside of the UI would be appreciated. Thank you.
- Labels:
-
IntegrationHub
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2022 09:01 PM
Hi Jeff,
Would like explicit information on how Variable Set is associated with a standard change.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2022 07:25 AM
From what I understand it uses a record producer to create the change and includes a variable set that requires certain additional values to be added to the chg on creation. I'm not familiar with exactly how it is set up. What I am trying to work out is how to programmatically submit the request to create the chg, and include the variables, using the rest API.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2022 11:21 PM
Hi Jeff,
The problem is that there isn't any variable set in the Change Request itself but in the Record Producer. There's a variable set in the Record Producer and there's probably a mapping or a Script to create the Change Request.
So the question probably is not about the getting the variable set in the Change Request but about getting the variable set in the Record Producer. As such, information about the Record Producer is necessary to know how to get the variable set data through API. Unfortunately, it seems like you don't have any information about the Record Producer nor how it's creating a Change Request.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2022 12:43 AM
Hi Jeff,
Below KB might give you the information you are looking for
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0686272