- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2025 10:25 AM
Hi,
Need help to pass multiple values from SNOW to JIRA. We are using record producer and we have list collector variable with the choices defined in the question_choice table. In the flow designer, I have done a look up in the question_choice table with condition "sys id is one of getcatalogvariable.variable_name" and also tried with a flow variable by taking For Each question choice value. Also tried with a script
I am getting this type of error :
{ "Action Status": { "code": 1, "message": "Error: Option value ' Turbo' is not valid (Process Automation.3c5dd02e77f11110cc985228c81061d5; line 4)" } }
Can somebody please help me to achieve this requirement ?
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 07:46 AM
how does JIRA expect the value?
use this to get display value
var users = '' + fd_data._1__get_catalog_variables.variable_name.getDisplayValue(); // convert to string
return users.toString();
OR
If the above doesn't work then use this
var users = '' + fd_data._1__get_catalog_variables.variable_name.toString();
var arr = [];
var gr = new GlideRecord("question_choice");
gr.addQuery("sys_id", "IN" , users);
gr.query();
while (gr.next()) {
arr.push(gr.getValue('text'));
}
return arr.toString();
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2025 10:05 AM
Hello @Koyel Guha ,
Can you try the below script.
var users = '' + fd_data._1__get_catalog_variables.variable_name; // convert to string
var list = users.split(','); // Convert the comma-separated string to an array
return list;
If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 06:56 AM
Hi Najmuddin,
Thank you for your response.
I have tried what you have advised. However, I am getting sys ids
["c5d1a665ebeb56109ba3f4de0bd0cd30","9102e2a5ebeb56109ba3f4de0bd0cd92"]
and it is giving an error : Error: Option value '"9102e2a5ebeb56109ba3f4de0bd0cd92"]' is not valid (Process Automation.5e66797e9f9c02105760e6073b0a1c1c; line 3)
can you please help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 10:16 AM
Hello @Koyel Guha ,
What exactly the Output you need ?
Can you try with Postman with multiple users to JIRA and check?
If it's accepting multiple users, then what it need to be get?
The user names ?
Since, you are getting sys_id, you can glideRecord the 'sys_user' table in the script and return gr.getDisplayValue(), or gr.name or anything...
If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 07:46 AM
how does JIRA expect the value?
use this to get display value
var users = '' + fd_data._1__get_catalog_variables.variable_name.getDisplayValue(); // convert to string
return users.toString();
OR
If the above doesn't work then use this
var users = '' + fd_data._1__get_catalog_variables.variable_name.toString();
var arr = [];
var gr = new GlideRecord("question_choice");
gr.addQuery("sys_id", "IN" , users);
gr.query();
while (gr.next()) {
arr.push(gr.getValue('text'));
}
return arr.toString();
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader