- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2023 01:59 AM - edited ‎09-19-2023 02:00 AM
Hello,
I need help.
The requirement is I need to look up records of change request that will be deploy on tomorrow with some of conditions. Then it needs to generate the URL and short description for each record and POST to Microsoft Teams Channel.
What I am getting stuck is I am not sure how to consolidate the list of records of data.
I tried to look up records and set flow variables then post the message to Teams channel
Problem is once I could look up 4 records, it will update flow variables but it will overwrite each flow variables value, so I will get the data only the last record instead of all 4 records.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2023 08:18 AM
Hi,
You should append the flow variable instead of setting up each time.
Sample code for the same
/*
**Access Flow/Action data using the fd_data object. Script must return a value.
**example: var shortDesc = fd_data.trigger.current.short_description;
**return shortDesc;
*/
var ret=fd_data.flow_var.smsg;//value of the flow var to be set
var uid="User has been created";
if(ret)
return ret+uid;
else
return uid;
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2023 08:18 AM
Hi,
You should append the flow variable instead of setting up each time.
Sample code for the same
/*
**Access Flow/Action data using the fd_data object. Script must return a value.
**example: var shortDesc = fd_data.trigger.current.short_description;
**return shortDesc;
*/
var ret=fd_data.flow_var.smsg;//value of the flow var to be set
var uid="User has been created";
if(ret)
return ret+uid;
else
return uid;
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2023 08:50 AM
I got your idea but I really don't know how to achieve it.
As you can see in my picture, I need to print the hyperlink by getting the data (sys id and number) from 'For each' look up change request records.
How to append the flow variable for this case?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2023 09:01 AM
This can be done, within loop you can append the variable and outside loop you can use it.
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2023 06:59 PM
I could achieve it already. I really appreciate for your help.