0
votes

SortByColumns(Search('[dbo].[Efftronics Systems Pvt Ltd_,$Sales Header]', TextSearchBox1.Text, "Applies-to_x0020_Doc__x0020_No_","Applies-to_x0020_ID","Area"), "Applies-to_x0020_Doc__x0020_No_", If(SortDescending1, Descending, Ascending))

These are the columns in the table

I am connect to SQLServer from powerApps. Then I have connected to one table. Then PowerAPPS Building App itself.

In the first page It is for Searching. But It is showing Error.

Inner Exception: Syntax Error at position 8 in Applies-to_x0020_Doc__x0020_No desc

I am very new to PowerApps.

I Want to search only with No_ column values. How to write search command for this.

I am new to PowerApps. This is my first App.

Any help would be Appreciated.

1

1 Answers

0
votes

You need to put sort order after every column, you got this error because after "Applies-to_x0020_Doc__x0020_No_" you got "Applies-to_x0020_ID" instead of If(SortDescending1, Descending, Ascending)

SortByColumns( Table, ColumnName1 [, SortOrder1, ColumnName2, SortOrder2, ... ] )