web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How To: Gallery Select...
Power Apps
Answered

How To: Gallery Selected Sharepoint list 1 looks up sharepoint list 2 and displays form

(0) ShareShare
ReportReport
Posted on by 65

Hello,

 

I have 2 sharepoint lists that are used as a relationship.  I would like to show an edit form if the gallery 1 (referencing sharepoint list 1)  is selected and shows a 1:1 match in sharepoint list #2  if not I have a bunch of input fields that patch over and in contrast would like those shown only if gallery 1 is selected and there is no 1:1 match in sharepoint list 2.

 

hopefully this makes sense and appreciate any help on how to solve this. 

Categories:
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    HI @mattthew ,

    Do you want to display the Edit form only when the Gallery1 item is selected, and only have single one record matches this selected item from your SP List2?

     

    I assume that there is a common column between your SP List 1 and SP List2, please consider set the Visible property of the Edit form to following:

    If(
     !IsBlank(Gallery1.Selected) && CountRows(Filter('SP List2', CommonID = Gallery1.Selected.CommonID)) = 1,
     true,
     false
    )

    Note: The CommonID represents the common column between the SP List 1 and SP List 2, on your side, please replace it with actual column name from your SP Lists. You use the Common Column to set up the relationship between the List 1 and List 2.

     

    Best regards,

  • mattthew Profile Picture
    65 on at

    Thank you @v-xida-msft  , quick question on this.  How would I adjust the edit form to be the filtered selection?

    In item of the form it doesn't seem to allow me to do a filter.    Thanks again!

  • mattthew Profile Picture
    65 on at

    Actually I added a hidden gallery filtered based on your query above and adjusted the edit form item to that gallery.  That seems to have resolved the issue.  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard