The CreatorCon Call for Content is officially open! Get started here.

Need help to consolidate list of look up records and post the data to Teams Channel

Bird1
Mega Sage

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

 

Bird1_0-1695113633148.png

Bird1_0-1695114021504.png

 

 

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.

 

Bird1_3-1695113874760.png

 

 

Bird1_2-1695113829346.png

 

 

 

1 ACCEPTED SOLUTION

Saurabh Gupta
Kilo Patron

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

View solution in original post

4 REPLIES 4

Saurabh Gupta
Kilo Patron

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

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?

 

 

Bird1_0-1695138471606.png

 

This can be done, within loop you can append the variable and outside loop you can use it.

 


Thanks and Regards,

Saurabh Gupta

I could achieve it already. I really appreciate for your help.