Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Issue with getting values from look up records.

Pavan Kumar28
Tera Contributor

Hi Team,

currently I am using look up records to fetch the user records from SN table as a output I could able to get count of the records. What i needed is to get the userId's of each records in comma(,) separated. Example abueltutor, Candy, Alexi.

Pls let me know how can I achieve this.

 


Thanks and regards,
Pavan.

 

1 REPLY 1

Sandeep Rajput
Tera Patron
Tera Patron

@Pavan Kumar28 Since you mentioned Look up records, I am assuming you are doing this operation in a flow.

 

1. As a first step, you would need to define a flow variable.

Screenshot 2024-03-22 at 12.17.48 AM.png

2. In step 2, use a For each look after your Lookup record step and set the flow variable according to the following configuration.

 

Screenshot 2024-03-22 at 12.21.05 AM.png

Hope this helps.