Hello, I need the user to be able to select which column to display and in this column only fields containing "NR 12" are displayed, is there any way? I tried to perform the following functions: SortByColumns (Table2; Dropdown1.Selected.Value) in the gallery, but couldn't filter the "NR 12" values, and the one in the image, would work if I made a screen for each column, but I I find it unfeasible.
line of cod in my gallery
table
Hi @Vitorino07 ,
Do you list your available filter columns of your data source within a Dropdown box?
Do you want to filter your Gallery Items based on the selected column within the Dropdown box?
If you want to filter your Gallery Items based on dynamic column selection, I afraid that there is no way to achieve your needs in PowerApps currently.
The third argument of the Search function is required to provide a actual column name, but the Dropdown1.Selected.Value would return a Text value, which could not be recognized as a Column name automatically.
As an alternative solution, I think If function could achieve your needs. I have made a test on my side, please take a try with the following workaround:
Set the Items property of the Gallery to following:
If( Dropdown1.Selected.Value = "FORNO"; Search(Table2; "Habilitado NR 12"; "FORNO"); /* <-- "FORNO" here is a Column name from your Table2 */ Dropdown1.Selected.Value = "BOSCH"; Search(Table2; "Habilitado NR 12"; "BOSCH"); /* <-- "BOSCH" here is a column name from your Table2 */ Dropdown1.Selected.Value = "TCM"; Search(Table2; "Habilitado NR 12"; "TCM"); /* <-- "TCM" here is a column name from your Table2 */ ... )
Please consider take a try with above solution, check if the issue is solved.
Best regards,
User | Count |
---|---|
140 | |
133 | |
79 | |
75 | |
74 |
User | Count |
---|---|
210 | |
200 | |
71 | |
66 | |
55 |