Trouble fetching values of List Collector variable using For-each logic in ServiceNow

NirupamH1
Tera Contributor

Hi All,

 

In my catalog item, I am using "Account" variable which is a multi-collector variable. Now once, my request is submitted a subflow is supposed to be triggered which will run "for- each" value of Account. Now, in order to achieve this, I used For- each but whenever the flow is triggered the for-each is not retrieving any single value of Account. PFA the screenshot below:

 

NirupamH1_0-1698857462678.png

 

Here although the Account value is being retrieved through "Get Catalog Variables" step, for-each is not working as it should. Kindly, suggest a solution for this.

 

Thanks and Regards,

Hrithik Nirupam 

1 ACCEPTED SOLUTION

Hello @NirupamH1 

 

Ohh sorry my bad.

 

For this use lookup multiple and give the table name and give condition as

Field_name.sys_id ISONEOF list collector

 

Then update multiple or create new record.

 

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.

View solution in original post

4 REPLIES 4

Harsh_Deep
Giga Sage
Giga Sage

Hello @NirupamH1 

 

For MRVS you need to check this docs-

https://www.servicenow.com/community/workflow-automation-articles/how-to-use-multirow-variable-sets-...

 

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.

Hi @Harsh_Deep ,

 

Your solution is valid for mvrs but my account variable is a list collector variable in which I can store multiple accounts and pass it onto the flow. Can you suggest a solution according to list collector variable type?

Hello @NirupamH1 

 

Ohh sorry my bad.

 

For this use lookup multiple and give the table name and give condition as

Field_name.sys_id ISONEOF list collector

 

Then update multiple or create new record.

 

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.

Thank you @Harsh_Deep , it is working as accepted now.