cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BBD
Level: Power Up

Add a field from another list to my array

We have two lists in Sharepoint: One with members (including names, phonenumbers, email addresses and usernames) and one with some metadata on some of the members (specifically this is about an expiration date). We need a flow to send an email when the expiration date has passed. My flow will (1) get the data from both lists, (2) combine this information in a usable array, (3) loop through this array sending emails to every member with his/her information.

 

For now I have retrieved information from the metadata list and the members list. With the Select action, I create a new array with just the properties I need (MemberId, Name, Expiration date). I would now like to add a 4th column containing the email address, but I am unable to find a way to lookup the email by MemberId, in the members list data.

 

I've gotten as far as adding the extra column using the formula 

body('Get_Members_from_Sharepoint')['value'][item()['ID']]

in the Select action. Of course, this gets me the wrong record since I'm using the ID to reference the row. (It also gets me the full record instead of just the email addres, but one thing at a time..) What I need is to replace this with some kind of lookup, but I can't find any function that does a normal lookup or find the way I'm used to in other platforms.

 

Hopefully someone can point me in the right direction.

1 REPLY 1
Highlighted
Community Support Team
Community Support Team

Re: Add a field from another list to my array

Hi @BBD,

 

Could you provide more details of your two lists, is it that both lists contain a MemberId for unique identification?

I am curious how you created a new array with just the properties you need (MemberId, Name, Expiration date) with the select action.

I did a test on my side, because I want to use the Select action, so I used two Allow to each, and there is no what you said can not lookup the email, but because of the use of two Apply to each, the array contains duplicate elements.

Maybe your method is more subtle, could you share the details of the current Flow creation?

I would be helpful if you posted a screenshot of the configuration of your flow and we would provide a proper workaround for you.

 

Best Regards,

Barry

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.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 255 members 6,552 guests
Please welcome our newest community members: