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

Get one to many value between SP lists in FLow

Dear Flow Guru, 

I was stuck in the step to retrieve data between 2 SP lists as below:

1. MasterData which has ID & name column:

MasterDataIDName
 1MrB
 2Mr E

2. DetailData which has a copy from MasterData ID value and other data value:

 

DetailDataMasterIDNameClass
 1Mr Aart
 1Mr AScience
 1Mr Amatch
 2Mr Eenglish

 

when complete a flow as see below, the value i received is duplicated as i knew because of the loop. But I couldnt find a better way to get data like:

NameClass  
Mr Aart  
Mr AScience  
Mr AMatch  
 

 

Capture.JPG

4 REPLIES 4
gabibalaban
Super User II
Super User II

Hi @huuthang ,

What trigger is in fact your trigger "SharePoint - When an item is requested" ? I'm not familiar with this one ...

 

Here is my thoughs:

gabibalaban_0-1614794367736.png

 

after that you can use the results of Create an HTML action to the email body.

 

Hope it helps !

 

Hello @gabibalaban ,

 Thanks for your input. However, I need to provide more detail for your understanding. I have 2 SP Lists named:

  • Product_requisition_master (ID, requester, Department)
  • Product_request_details (MasterID, Prod_code, Prod_description, qty)
    • MasterID.value is generated from ID.value anytime a user create a new request
      • and the relationship between ID vs MasterID is one-to-many

Ex: I create a new item in SP list Product_requisition_master:

1.JPG

After submit this request --> the 2nd SP list will be created detail values:

2.JPG

in Flow:

when an item is created which i trigger the SPlist Product_requisition_master

Get Items which i trigger SPlist Product_request_details

 

and the end of the flow what i want to get is the detail of each request:

request_by: trinh, thang

request_info: tes

Prod_code | Prod_description | Quantity

1212          | qwww                  | 13

1212e        |sshsjs                    | 13

 

 

@huuthang ,

My presumption was correct, the sample that I sent to you is what you need, BUT ...

I think you need to reconsider the scenario, because most probably your flow will be  riggered before or during the new items creation in Product_requisition_details and the detail list might be incomplete (containing only the data written in the list at interogation time).

How you choose to create the detail items ? Using the SharePoint form ? 

Dear @gabibalaban ,

I fixed my issue now as it is very simple technique as i dont need to create a loop for each item a new user create new item 🙂 .

To answer your question: I created a powerApps to create product details. Once user create item, data will Patch to the SP list "product detail".

 

By the way, I'm glad to discuss with you. Thank you

 

Capture.JPG

Helpful resources

Announcements
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

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (57,948)