How do I dereference service catalog variables in flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 04:25 PM
Two of my variables are working as I expect. Ticket_number and number_of_instances. The rest are grayed out. Not sure what I have to do to unlock this. Thank you in advance for the help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2024 07:21 AM - edited 09-14-2024 08:37 AM
From the screenshot, it appears you're trying to use the variables as part of JSON-type input value and it seems to limit only to String type variables.
Option 1: You might have to create and store any non-string values into Flow Variables (of String type) and then you should be able to use them.
Option 2: Toggle the scripting on and then dot walk to the catalog variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2024 12:49 PM
Craig thanks for the feedback. Do you have any links that might help me make a decision? I have no formal servicenow training. Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2024 04:30 AM
Sure -
Option 1:
Create Flow Variable - https://docs.servicenow.com/bundle/xanadu-build-workflows/page/administer/flow-designer/task/create-...
Set Flow Variables flow logic - https://docs.servicenow.com/bundle/xanadu-build-workflows/page/administer/flow-designer/concept/flow...
Option 2:
The second link above also includes an example of the dot-walking - see "Example: Set the incident number variable value using a script".
The script might look something like this:
var result = {
"color": fd_data._1__get_catalog_variables.select_color,
"desc" : fd_data._1__get_catalog_variables.description
}
return result;