Error: Cannot find function trim in object in flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 04:17 AM
I have created an action to fetch the current incident's assignment group member. Later I am using this in a flow with "For Each item in" > "Add member to chat"...(SN - MS Teams integration)
While executing the flow, able to fetch the email IDs via first action. However when it comes to "For Each item in", it says "Error: Cannot find function trim in object (comma separated list of email Ids)". Any suggestions why this error is appearing.
Thanks in advance for help,
Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 05:19 AM
so what does that For Each iterate?
Does it iterate user email or user name?
Are you using trim in that custom action?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 05:34 AM
it iterate for email ID, which i have fetched via earlier action.
No I am not using trim in custom action. but i can see trim is being used in OOB Action "Add member to chat", which i am using in "for each item in" -
outputs.chat_id = inputs.chatId.trim();
outputs.azure_id = inputs.azureId.trim();
I did try to remove trim or add toString() before trim, but it gives same error.
Thanks,
Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 05:37 AM
try to use toString() and then use trim
outputs.chat_id = inputs.chatId.toString().trim();
outputs.azure_id = inputs.azureId..toString().trim();
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 06:32 AM
i did try earlier like this... same issue.