cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Referencing Get Items results in Apply to each

Hi all,

 

I'm trying to create the following flow: 

  1. In a form you can select 1 or multiple companies
  2. The contact person, e-mail adress, ... of those selected companies are saved in a SharePoint list
  3. For every selected company in the form, it should compare if it exists in the SharePoint list
  4. If there is a match, it should send an e-mail to the corresponding e-mail address.

 

What I have now:

  1. All the selected companies in the form are saved in an array variable that is named 'test'
  2. Compare each company in the array variable with the companies in the SharePoint list
  3. To every match, save the details in a variable of the current item -> Here I just want to save the e-mail instead of all the information, so I should write an expression here but I don't know how I have to do that.

 

Flow 1.png

Flow 2.pngFlow 3.png

This is what's inside the e-mail variable now: (I only want to register the e-mail field in the variable)

Flow 4.png

 

Thanks a lot!

 

Kind regards,

Simon

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @v-bacao-msft and @yashag2255 ,

 

Thank for helping me how I should write an expression. The correct expression in this case was items('Apply_to_each_2')['E_x002d_mail'].

 

Thanks a lot for your help!!

 

Simon

View solution in original post

5 REPLIES 5
Dual Super User II
Dual Super User II

@SimonLG  you could try copying the "Current Item" from the field and paste in the expression editor and then add ['Email'] next to it. The expression should look something like this: 

items('Apply_to_each')['Email']

here Apply to each is the name of my loop action. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Community Support
Community Support

Hi @SimonLG ,

 

Please try to add these expression to e-mail variable:

items('Apply_to_each_2')['Author']['Email']

Here you need to reference Created by Email, so please use the Expression above to get this value.

29.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-bacao-msft and @yashag2255 ,

 

Thank for helping me how I should write an expression. The correct expression in this case was items('Apply_to_each_2')['E_x002d_mail'].

 

Thanks a lot for your help!!

 

Simon

View solution in original post

@yashag2255 Thank you.. This saved my life. !

Frequent Visitor

Sometimes dynamic content is not shown but you can anyways search for your column values in the search box and it will come up in the menu.

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (47,111)