- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2023 11:05 AM
Hi folks,
Working on a flow to create a remote incident for eBonding and I need to get the priority value as a number (1-4). This is how it appears in the Incident table when I do "Show XML" on an incident. When I add it as a Name:Value pair in the payload builder I am not getting that, but instead I am getting the value that is selected in the Choice List (which has also some extra text that we do not want). I tried applying the "First Character" transform but this is crashing the flow because i do not think the input data is a string. Can anyone suggest the way to get this value as the numeric that appears in the table?
Thank you,
Ken
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2023 02:56 PM
I was able to solve it by creating a flow variable and adding the following code to pull the value for the variable:
var priority = fd_data.trigger.current.priority;
var ePriority;
if (priority=='5'){
ePriority = '4';
} else {
ePriority = priority;
}
return ePriority;
The vendor will only accept 1-4. I was able create an input on my "create remote incident" action and populate it with this variable.
Ken

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2023 11:22 AM
Hi,
As you can see in the Data panel on the right side, the Priority is not treated as an Integer, but a choice.
To get the actual value, you'll need to do a little inline script to retrieve the value.
Example below:
var prioValue = fd_data.your_action_that_contains_the_incident_data.priority.toString();
return 'Priority is: ' + prioValue;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2023 11:44 AM
Hi OlaN,
Thanks for your reply. Where do I add the inline script? I have created a Flow Variable called priorityValue. Is this where I add the script? If so, how?
Thanks,
Ken
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2023 02:56 PM
I was able to solve it by creating a flow variable and adding the following code to pull the value for the variable:
var priority = fd_data.trigger.current.priority;
var ePriority;
if (priority=='5'){
ePriority = '4';
} else {
ePriority = priority;
}
return ePriority;
The vendor will only accept 1-4. I was able create an input on my "create remote incident" action and populate it with this variable.
Ken