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 / Troubles with linked g...
Power Apps
Answered

Troubles with linked galleries and filtering

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello, 

 

I am attempting to create two galleries that show the list of submissions to a form also located in the same app. One of the galleries would ideally show the entries (I have it set up to show the date, title, and person who submitted it), and the second gallery would ideally show the details of the submission selected in the first gallery. 

 

If possible, I would also like to be able to filter the submissions show in the first gallery by inputted date, name and/or title. Is this possible? I have found information on how to filter galleries, but haven't found anything on if multiple filters can be used, and haven't been able to get the filters to work. 

 

Thanks in advance. 

Categories:
  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    Are you sure you want a gallery for the second part? If you are showing the details of the selected item in the first gallery I would think a view form would be more appropriate. The only reason to use a gallery for the details would be if the details were a multi-select field of some kind.

     

    Yes, you should be able to filter the first gallery. Since the second gallery/form would be based on the selection in the first you wouldn't need to filter that. Multiple filters are either nested inside each other or a single filter with multiple values being checked. The nesting is useful if some of your filter statements are non delegable. In that case you put the delegable filters in an inner filter and use the results of that with the non-delegable filter.  For example if I want to filter based on the location being a particular city and the topic being in a list of potential topics I could write the items property of the gallery like this

    filter(filter(<<datasource>>,City=cityTexbox.Text),Topic in <<TopicsList>>)
  • JatinSaini Profile Picture
    428 on at

    That's quite a simple approach:

     

    Hoping that you would already have the two galleries code with you. and just require multiple filtering conditions for the gallery 1, here are some views on it:

    Requested Filters are: inputted date, name and/or title

     

    INPUTTED DATE

    For this we will be needing two date picker control which will serve as a Date Range (From and To):

    Datepicker Control 1 - From Date (named as fromDate)

    //setting 30 days before today as default date

    DefaultDate = DateAdd(Today(),-30)

     

    Datepicker Control 2 - To Date (named as toDate)

    //setting 90 days from today as default date

    DefaultDate = DateAdd(Today(),90)

     

     

    NAME (Person Who Submitted It)

    Add a single Text Input Control named as Person_TextInput

     

    TITLE

    Add a single Text Input Control named as Title_TextInput

     

    _____________________________________________________

    Here's the Items Property code for your Gallery 1 with filters:

     

    Filter(SharepointList,

    And('InputtedDate' >= fromDate.SelectedDate, 'InputtedDate' >= toDate.SelectedDate,

    StartsWith(Name,Person_TextInput),

    StartsWith(Title,Title_TextInput))

    )

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This is very helpful thank you. However, I think I am still doing something wrong, as nothing pops up in the gallery when I test it. Here is the code I used for the last part. 

    Arianafloyd_0-1686755658158.png

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I had not thought of using a view form, so thank you for the suggestion. I am still unsure how to make the selected response show in the form however. 

     

    Also, due to lack of room on the page, is there a way to make the associated view for open on another page, when the response is selected in the gallery? If so, how would I go about doing that?

  • Verified answer
    Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    Set the Item property of the form to be Gallery1.Selected. To do it on another page set the navigation to create a context variable using Gallery1.Selected and then set the Item property to that context variable.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    That worked thank you!

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 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard