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.
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 Itemsproperty of the Galleryto following:
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.
Community Support Team _ Kris Dai If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.