cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dave_31415
Level: Powered On

Retrieve and Display Data From Multiple Sharepoint lists via ID

Hello,

I have the following sample sharepoint lists:

 

Material Cut Records

ID    Material Roll Number     . . . . .

54        123

55        234

56        345

.

.

.

100      123

101      234

102      345

 ------------------------

Produced Unit Records  

ID    Cut ID   UnitNum  . . . . .

11      100      AB444

12      101      AB555

13      102      AB666 

 ------------------------

Spare Material Records

ID    Cut ID   Size . . . . . 

1       54         0.5

2       55         0.7

3       56         0.4

 ------------------------

 

What I would like to do in powerapps is something like: 

 

Show all: (Produced Unit Records and Spare Material Records) that came from (Material Roll Number: 123).

 

I have been trying a variety of formula in powerapps but have not got this right yet. I could display the resulting data from this query however will work easily enough. I have been currently trying to make this query and display the result in a DataTable but if there is an easier method to query this and display it, please suggest. If I can make this query work, I may next look to export the query from powerapps to an excel sheet.

 

I appreciate any help offered.

 

Thank you much.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Retrieve and Display Data From Multiple Sharepoint lists via ID

Hi @Dave_31415 

 

You can use one collection to union the Produced Unit Records and Spare Material Records firstly, and then use filter.

Firstly, add one button control,

Button.OnSelect=ClearCollect(test,Ungroup(Table({MyTablesSmiley TongueroducedUnitRecords},{MyTablesSmiley FrustratedpareMaterialRecords}), "MyTables"))    (test is the collection name)

 

Then add one Gallery control or Data Table Control, Gallery/Data Table.Items=Filter(test,ID in Filter(MaterialCutRecords,MaterialRollNumber=123).ID)

 

You can also use this formula expression in the Items not without use colleciton:

Filter(Ungroup(Table({MyTablesSmiley TongueroducedUnitRecords},{MyTablesSmiley FrustratedpareMaterialRecords}), "MyTables"),ID in Filter(MaterialCutRecords,MaterialRollNumber=123).ID)

 

Best Regards.

Yumia

 

2 REPLIES 2
Community Support Team
Community Support Team

Re: Retrieve and Display Data From Multiple Sharepoint lists via ID

Hi @Dave_31415 

 

You can use one collection to union the Produced Unit Records and Spare Material Records firstly, and then use filter.

Firstly, add one button control,

Button.OnSelect=ClearCollect(test,Ungroup(Table({MyTablesSmiley TongueroducedUnitRecords},{MyTablesSmiley FrustratedpareMaterialRecords}), "MyTables"))    (test is the collection name)

 

Then add one Gallery control or Data Table Control, Gallery/Data Table.Items=Filter(test,ID in Filter(MaterialCutRecords,MaterialRollNumber=123).ID)

 

You can also use this formula expression in the Items not without use colleciton:

Filter(Ungroup(Table({MyTablesSmiley TongueroducedUnitRecords},{MyTablesSmiley FrustratedpareMaterialRecords}), "MyTables"),ID in Filter(MaterialCutRecords,MaterialRollNumber=123).ID)

 

Best Regards.

Yumia

 

Dave_31415
Level: Powered On

Re: Retrieve and Display Data From Multiple Sharepoint lists via ID

Thank you Yumia. This worked for me. I really appreciate your help - I was stuck on this all day yesterday. 

Helpful resources

Announcements
SecondImage

Join our Live PowerApps Webinar

Tomorrow, September 24st at 10am PDT

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 320 members 4,894 guests
Recent signins:
Please welcome our newest community members: