- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 02:18 AM
Dear Community !
I have an issue with a list collector field value in flow desinger.
Objective :
I want to collect the list of CIs in a list collector and use in flow designer to set them as Non-Operational. I tried to create a custom Action and use in flow to parse with split(','). But had no luck. Seems like the issues is with input and output value types such as array.object or array.string.
i Tried both but no luck, in flow log i get return value as [Object Glide Record].
Error Log:
INPUT:
SCRIPT :
OUTPUT:
@Ankur Bawiskar , I refered to your article too... can you help in this case?
@Community Alums , @Sagar Pagar.
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2024 01:20 PM
Hey @Sohail Khilji,
Thanks for your details here! We've been trying to work on a similar dev effort and the Custom Action isn't working for us either.
I'm not sure if you're still experiencing this issue/situation, but I was able to come up with a potential solution without using the Custom Action. See my comment on: https://www.servicenow.com/community/developer-blog/using-list-collector-in-flow-designer-for-each-l...
Thanks,
Josh Pirozzi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 02:57 AM - edited 07-26-2023 02:58 AM
Hello @Sohail Khilji ,
In the script step where you are populating the output.variable, instead of adding -
outputs.variable = inputs.variable.toString().split(',');
please replace with the below line -
outputs.variable = JSON.stringify(inputs.variable.toString().split(','));
This will definitely remove the "[object GlideRecord]" output.
Hint: JSON.stringify() takes a JavaScript object and transforms it into a JSON string.
Please mark the answer as correct if it helps!
Thanks,
Ni**bleep**a
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 03:27 AM
@Nishita Padwal , Thanks, That works but,
cant use the output of action in ForEach condition. I tried to log both varaibles but i get runtime value as empty.
Any suggestions ?
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2024 01:20 PM
Hey @Sohail Khilji,
Thanks for your details here! We've been trying to work on a similar dev effort and the Custom Action isn't working for us either.
I'm not sure if you're still experiencing this issue/situation, but I was able to come up with a potential solution without using the Custom Action. See my comment on: https://www.servicenow.com/community/developer-blog/using-list-collector-in-flow-designer-for-each-l...
Thanks,
Josh Pirozzi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2024 12:00 AM
Hi !
If you could share the script, it will be helpful for future readers because this is a common issue observed by all users of get catalog Variables action.
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....