String concatenation in flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 07:57 AM
Hi team,
i am using flow designer. I have created a flow variable x.
In flow i have for each loop, after every iteration i want concatenate variable x with new value.
Like in pseudo script:
var x='';
for(var i in array)
{
x += array[i];
}
print(x);
how this can be achievable in flow designer?
- Labels:
-
Architect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 08:02 AM
Hi @arjun0101 ,
You can use below script in flow script.
var array = ["Runjay", "Patel"];
var x = '';
for (var i in array)
x += array[i];
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 08:24 AM
thank for your reply,
how to declare variable in flow and use it for append new values?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 08:09 AM - edited 11-21-2024 08:11 AM
Hi @arjun0101 ,
Do you face any issue with concatination code in flow, you already shared the code.
please share the flow screen shot where you are trying to add this logic.
-Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2024 08:22 AM
Hi Ashish,
here in for each loop , after action execution i want append var x with action output.