Issues with a Custom Script Action on Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 01:51 PM
Hi,
I have a Custom Script Action on Flow Designer that calls a Script Include & returns the list of Approvers. The Script Output is of type String & the Output is also of type String. The data returned is accurate ["e8615e3edba60c1026aef0152c961931"] but is appended with [""] which I am unable to use as a sys_id for adding Approvers in the flow.
I have tried to remove [""] by adding a Flow Variable that is scripted to remove these [""] but that returns blank. Also I have tried to change the Custom Script Action to Array.Object which didn't help. Any ideas. Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 08:46 PM
Hi, I have seen similar issues in flow where the result of some script is returned similarly, and it kinda looks like an object representation of the value returned by your code, but without a key so it can't be parsed out cleanly.
Can you stringify the returned result and then use replace() to remove the unwanted chars?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 08:59 PM
Hi @Phoenix_SN,
Can you share how you configured the custom script action and the script include?
It appears that you are not converting the array into a string correctly.
Cheers