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
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 ),
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)))
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!
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)
@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!
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" ),
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!