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

Returning attachments from gallery selection not of same data source

I've built (2) SharePoint lists (List 1 & List 2), one for housing data (List 1) and one for housing attachments (List 2). A column in list 2 is designated to house the ID #of the corresponding List 1 data. I need to do this to ensure proper flow functionality. I'm looking to select an item from a single gallery in a powerapp and subsequently navigate to a new detail screen with 2 forms visible. 1 form will show the selected item details in a form (List 1.selecteditem) - have this accomplished. I also want the second form on the screen to return the attachments of List 2 with file names displayed of all attachments based on filtering the attachments to that of the selecteditem.ID matching that of the attachments List column. Is this possible? If so, what coding or variables/collections would I need?
1 ACCEPTED SOLUTION

Accepted Solutions
v-monli-msft
Community Support
Community Support

Hi @blueicebummer ,

 

This can be achieved by setting below formula on the Item property of the 2nd Form:

Lookup(List2,LookupColumnName.Value=Gallery1.Selected.ID)

 

Regards,

Mona 

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

View solution in original post

3 REPLIES 3
PowerAddict
Super User II
Super User II

Is there a reason you cannot display the attachments in a gallery? You could just have a filtered gallery of attachments, filtering it based on ID = List1.Selected.ID. Forms are used to display an individual record not a list of records. Let me know if this helps. 

v-monli-msft
Community Support
Community Support

Hi @blueicebummer ,

 

This can be achieved by setting below formula on the Item property of the 2nd Form:

Lookup(List2,LookupColumnName.Value=Gallery1.Selected.ID)

 

Regards,

Mona 

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

View solution in original post

Thank you!! Beyond the form item, the only additional piece was labeling the default of the attachments datacard to the same lookup but with the addition of .attachments

It worked perfectly.

Helpful resources

Announcements
PA 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

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,033)