Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Filter gallery based on data from another linked database

(0) ShareShare
ReportReport
Posted on by 101

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

  • JD_26 Profile Picture
    JD_26 101 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
     ),

     

  • JD_26 Profile Picture
    JD_26 101 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)))

  • Gochix Profile Picture
    Gochix 1,933 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
    JD_26 101 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
    Gochix 1,933 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
    JD_26 101 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
    Gochix 1,933 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!

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard