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 / Filter gallery based o...
Power Apps
Unanswered

Filter gallery based on data from another linked database

(0) ShareShare
ReportReport
Posted on by 102

I have been working with Power Apps for a few days and one of the task I have been set is to filter a table by another table.

At the moment I have created a dual search box using this code , which works fine , but this is from the Master_List

 

Filter(Master_List,StartsWith(Title,account_prof_search_box.Text)||(StartsWith(field_1,account_prof_search_box.Text)))

 

What I also want to add , is a drop down filter from column field_10 from Data Source Master_Profiles.

The tables are linked by the Title Field

 

I want the Master_Profiles to filter the Master_List , so if the value from field_10 is selected , only show the data in the Master_List with the matching Titles.  Is this possible

Categories:
  • Gochix Profile Picture
    1,937 Moderator on at

    Hi @JD_26 ,

    Add a DropDown menu. Set it's Items property to 'Master_Profiles'.field_10

    You this and let me know if this works.

     

    If(
     !IsBlank(Dropdown.Selected.Value),
     SortByColumns(
     Search(
     Filter(
     'Master_List',
     field_10 = Dropdown.Selected.Value
     ),
     account_prof_search_box.Text,
     "Title",
     "field_1"
     ),
     "Title",
     Ascending
     ),
     SortByColumns(
     Search(
     'Master_List',
     account_prof_search_box.Text,
     "Title",
     "field_1"
     ),
     "Title",
     Ascending
     )
    )

     


    _____________________________________________________________________________________
    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

  • JD_26 Profile Picture
    102 on at

    The master_list does not have field_10 , the only matching field for both tables is the Title field

     

    If(
     !IsBlank(Dropdown.Selected.Value),
     SortByColumns(
     Search(
     Filter(
     'Master_List',
     field_10 = Dropdown.Selected.Value
     ),
     account_prof_search_box.Text,
     "Title",
     "field_1"
     ),
  • Gochix Profile Picture
    1,937 Moderator on at

    @JD_26 ,

    Try this then:

    If(
     !IsBlank(Dropdown.Selected.Value),
     SortByColumns(
     Search(
     AddColumns(
     Filter(
     Master_Profiles,
     field_10 = Dropdown.Selected.Value
     ),
     "searchthis",
     Title
     ),
     account_prof_search_box.Text,
     "searchthis",
     "Title",
     "field_1",
     "field_10"
     ),
     "Title",
     Descending
     ),
     SortByColumns(
     Search(
     'Master_List',
     account_prof_search_box.Text,
     "Title"
     ),
     "Title",
     "field_1"
     Ascending
     )
    )


    _____________________________________________________________________________________
    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

  • JD_26 Profile Picture
    102 on at

    I am getting an error showing on first line - 

    !IsBlank(Dropdown.Selected.Value)

    I am also populating the dropbox using this code , is this the reason for the error ?  I add the code to Items in the Dropbox Items field - Distinct(Master_Profiles,field_10)

  • Gochix Profile Picture
    1,937 Moderator on at

    Try to check the dropdown without this Distinct.. I tried at my end and it kind of was working and filtering out something. I can't check this for sure. You would have to adjust it for your needs if the formula is correct. 


    _____________________________________________________________________________________
    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

  • JD_26 Profile Picture
    102 on at

    I can't seem to get the dropdown option to work , so I have changed it to textbox search , at present i have built 3 search boxes , and as these are all from the Master_List , they work correct , is there a way to add the filter to this formula please

    Filter(Master_List,StartsWith(Title,search_code.Text)
    ,(StartsWith(field_1,search_name.Text))
    ,(StartsWith(field_4,search_region.Text)))

  • JD_26 Profile Picture
    102 on at

    Could somebody please let me know if this request is possible please ,

     textbox search , at present i have built 3 search boxes , and as these are all from the Master_List , they work correct , is there a way to add the filter to this formula please

    Filter(Master_List,StartsWith(Title,search_code.Text)
    ,(StartsWith(field_1,search_name.Text))
    ,(StartsWith(field_4,search_region.Text)))

     

    I need to add this but convert it to text box instead of drop down

    If(
     !IsBlank(Dropdown.Selected.Value),
     SortByColumns(
     Search(
     AddColumns(
     Filter(
     Master_Profiles,
     field_10 = Dropdown.Selected.Value
     ),
     "searchthis",
     Title
     ),

     

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

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard