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

Flow to lookup/pull MULTIVALUE data from one SharePoint list to another list.

Hello,

I'm a DIY'er, and have managed to build several flows successfully. I'm at my wits end on the issue below, and none of the solutions I've researched online seem to help me solve this one. I basically want to pull data from one list into another when a new item is created.

 

I have two lists: Q&A-List-1 (which captures questions from an MS form; these questions are categorized by Topic); and Assigned-SME-List-2 (contains names of primary and secondary Subject Matter Experts [SME] who are assigned to specific Q&A Topics).

Desired Outcome:

* When an item is created the Q&A-List-1, the flow should...

compare the Topic from the Q&A-List-1 with the Topic in the Assigned-SME-List-2.

* IF the Topics match, then pull the names of the "Assigned SMEs" and "Backup SMEs" from Assigned-SME-List-2 and add them to the related columns for the newly created item in the Q&A-List-1. 

 

I was able to get the flow working when there was only one name in each assigned SME field; but these fields need to include multiple names. As such, these are multi-value 'people or group' fields/columns, so a.) A regular "lookup" column won't work, and b.) I can't for the life of me figure out how to modify the flow and have it capture multiple names and prevent it from going into multiple "apply to each" loops.

 

Currently the trigger and actions I have are:

Trigger: When a new item is created in List 1

Action: Get Items from List 2

Action: Apply to each (value from List 2)

Action: Condition (when Topic, List 2 matches Topic List 1)

Action: Update item

 

I've tried every possible combination of values and actions in the above flow. Sometimes it says that the flow was successful, but it really wasn't, and now I can't see the error codes in the conditions (flow doesn't give me the option of opening the condition to see the input/outputs).

I also tried using "initialize variable" to get rid of the multiple "apply to each" - but I don't know enough about that function to make that work.

Any help is appreciated. Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @hhh312 ,

 

My demo flow was just for demonstrating how to append multiple values on a people field. Speaking of multi-select people column, it is actually a table with several columns and records. The append to array variable along with the apply to each action will get each record from that table and append a value to the variable so in the end the array variable will have the same number of records as that table, and column values based on the value settings in it. In my demo it means get Claims values from each of the People column's table value, and you will get a single Claims column array variable:

vjefferni_0-1644806238099.png

 

I am not aware of what you said nested apply to each actions, on your end I think it would be only 1 apply to each for the people column. Maybe it would be better for you to share a screenshot of your flow.

 

Best regards,

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

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

3 REPLIES 3
v-jefferni
Community Support
Community Support

Hi @hhh312 ,

 

It's easy to populate multi value person column in SharePoint lists, see below steps:

vjefferni_0-1644565036505.png

Only claims value is necessary in the array variable as well as for the multi-value person column input.

 

Hope this helps.

 

Best regards,

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

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Thank you for your time.

Unfortunately, this solution does not work for me, as it doesn't take into consideration a.) I don't want to 'create a new item,' I want to update the item that was already created, and b.) It doesn't factor in the condition to compare the 'Topic' value from the newly created item with the 'Topic' value of the name list (so the correct names are populated).

Also, when I do 'append to array variable,' I still get multiple nested "apply to each." 

I'll keep playing with the position of the 'initialize variable' function, which I totally don't understand. 

Thank you for your time, however. This gives me some helpful information.

v-jefferni
Community Support
Community Support

Hi @hhh312 ,

 

My demo flow was just for demonstrating how to append multiple values on a people field. Speaking of multi-select people column, it is actually a table with several columns and records. The append to array variable along with the apply to each action will get each record from that table and append a value to the variable so in the end the array variable will have the same number of records as that table, and column values based on the value settings in it. In my demo it means get Claims values from each of the People column's table value, and you will get a single Claims column array variable:

vjefferni_0-1644806238099.png

 

I am not aware of what you said nested apply to each actions, on your end I think it would be only 1 apply to each for the people column. Maybe it would be better for you to share a screenshot of your flow.

 

Best regards,

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

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (3,495)