cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Radoslavov
Helper V
Helper V

Get value from a step within Apply to Each

Hi All,

 

I'm trying to build an expression to get values from a step inside of apply to each.

The Retrieve country step contains countryid which i need in another step further in the process.

Radoslavov_0-1616666297128.png

Here i need to add the countryid so the correct country is linked to the record

Radoslavov_1-1616666375632.png

I've tried something like this:

first(outputs('For_each_registrant')['Retrieve_country']['value'])['cs_countryid']

but I got an error message (which I expected to happen), anyone can help me with the correct expression to get the value?

 

Thank you all for the help

Regards

Kiril

4 REPLIES 4
Mira_Ghaly
Dual Super User II
Dual Super User II

@Radoslavov 

What i understand that you are retrieving a List of countries in a step above is this correct?

 

Can you show complete screens of your flow?

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
Radoslavov
Helper V
Helper V

Hi, no I'm not retrieving a list of countries, I'm retrieving a specific country as in the step I have a filter that says which country to return from List records action

The flow is Huge and will only confuse you, the goal is to refer to Retrieve country steps' output anywhere in it using a custom expression to get the countryid value

Radoslavov_0-1616668456684.png

Thank you, regards

Kiril

Mira_Ghaly
Dual Super User II
Dual Super User II

@Radoslavov 

So I assume this is the output of a list records right?

 

outputs('List_Records')?['body/value'][0]['cs_countryid']

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

I get the same error message as the one before

 

Radoslavov_0-1616669795594.png

This is the entire flow structure

Radoslavov_1-1616669846520.png

 

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,267)