I am noticing one of the common errors with search in powerapp. I put in the below formula for Items proeprty of gallery control, but gives me invalid arguements error:
SortByColumns(Search(Inspections, TextSearchBox1.Text, "Title","Location","Inspection_x0020_Site_x0020_Name"), "Title", If(SortDescending1, Descending, Ascending))
Title is the OOTB column of SharePoint list, Location and Inspection site name are choice drop-downs. Can someone help me correct the formula? Thanks in advance.
Can you break down the formula and build it up one piece at a time to see exactly where the error is occuring?
E.g. start with Search(Inspections,TextSearchBox1.Text,"Title")
Then add the other fields and finally the Sort.
It is difficult to troubleshoot without knowing the data types of your fields and without being able to check the value in the variable SortByDescending1.
Do the choice columns allow for multi-selection? If so, I think they will be returning tabular instead of text data which woul result in an error.
I've just tested on choice fields with single-selection and it works as expected (although the formula is not delegable).
I just used a datasource I happened to have on-screen:
Search(RecommendedProduct, "litre", "Metric")
Where "Metric' is a SharePoint choice column set to single selection (in the SharePoint list definition).
Keep your eyes open for our upcoming T-shirt design contest!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020