web
You’re offline. This is a read only version of the page.
close
Skip to main content
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:
I have the same question (0)
  • Gochix Profile Picture
    1,935 Moderator on at
    Re: Filter gallery based on data from another linked database

    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
    Re: Filter gallery based on data from another linked database

    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,935 Moderator on at
    Re: Filter gallery based on data from another linked database

    @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
    Re: Filter gallery based on data from another linked database

    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,935 Moderator on at
    Re: Filter gallery based on data from another linked database

    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
    Re: Filter gallery based on data from another linked database

    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
    Re: Filter gallery based on data from another linked database

    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard