Hi,
I am building a PowerApp and looking for some suggestions on the following issue.
The App has a data source with Columns (A,B,C,D,E) and so what I would like to create is a drop down, which allows a user to select option D from A,B,C,D,E and then in the text input search box type something 'demo' and the gallery to bring back all results where 'Demo' is in option D.
Hope that makes sense
Kind Regards
Hi,
I have used your method and it works for what I am looking for.
Two questions -
1) Is there a way to stop the gallery from populating when i select an option from the dropdown, and only populates once i press the search button.
2) Is there anyway I can update the code to search for a number, as one of the columns as a sequence number and so i would like users to be able to select sequence number and it populate.
Thank you for your support on this.
Hi,
Thank you for your reply,
I will give your solution a try and see where I get too as I was hoping that the solution @PowerNuggets provided would cater my requirements.
Kind Regards
Hi @Gelegeta86
Please rename as per your controls names
Filter1 rename it to your drop down control name
"Requester organization" will be the column name in your data source that contain A,B,C,D
Textfield rename it to your search text box
'RequesterName" rename it to the column name you want to search for in your data source as you said Demo ...etc.
Hope this helps
KR.,
Hi @Gelegeta86,
Not sure if my reply is not what you want, so you insist on investigating that if dropdown seleted value could represent the column name directly.
Column Name expectd literal text string, which could not be referred to in Power Apps.
The only way you could do is to hard code the colum name based on dropdown selected value.
@PowerNuggets, I don't think you get what the @PowerNuggets wants to achieve.
It is not a deal about how you filter the data source, but to filter based on different columns by referring to dropdown selected column name directly.
Apologies I feel like I may be doing something different here ( I have covered the DB name).
Would you be able to advise.
Hi @Gelegeta86
yes, i assumed the filter 1 is your drop down menu and the textfield.Text is a search box, this way it will combine both
Hi,
Thank you for getting back to me.
I am looking for something similar however where you have 'Requester Organization' I would like this to change based on the value in the dropdown, is that possible?
Kind Regards
Hi @Gelegeta86
Try the below
Search(
If(
//this is for all filter
IsBlank(Filter1.Selected.Result),'data source',
//this is for filter chosen a value, example organization name
!IsBlank(filter1.Selected.Result), Filter('datasource','Requester Organization' = flter1.Selected.Result)),
//searching text field for example
textfield.Text,"RequesterName")
Hope this helps, if this solves your requirements kindly mark the post as solved
KR,
Hi @Gelegeta86,
Actually, we could only refer to column name using a literal text string not a value based on dropdown seletced.
As a workaround, you could use hard code as below:
If(Dropdown3.Selected.Value="D",Search(Data,TextInput1.Text,"D"),
Dropdown3.Selected.Value="A",Search(Data,TextInput1.Text,"A"),
...
)
WarrenBelz
146,731
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,075
Most Valuable Professional