I try to make a simple app from a SQL database
Unfortunately for me, one of the table fields is named "MA-nr", and it seems the minus in the filedname causes the problem
SortByColumns(Search('[dbo].[Personale]', TextSearchBox2.Text, "Name"), "Name", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))
Changing sorting 'Name' with 'MA-nr' Gives an error: "The requested operation is invalid. Server Response: Syntax error at position 3 in 'MA-nr asc'
SortByColumns(Search('[dbo].[Personale]', TextSearchBox2.Text, "Name"), "MA-nr", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))
It seems that the problem comes from field name 'MA-nr'
I tried to use the name in brackets and apostrophe, but without luck
Unfortunately I cannot change the field name in the table,because it is in use many other places and applications
Any idea how to overcome this obstacle?
The screenshot follow:
Thanks for the feedback.
Issue confirmed from my side.
I will send this to the proper team.
I have some feedbacks on this issue.
This issue is caused by SQL Server connector, currently connectors would only translate the function (filter, sort and so on ) into OData Query, and OData Query doesn't support parameter like '-'.
There would be updates on this, and no ETA could be shared at this time.
Ther error would occur because there is query sent back to the server, a workaround to clear the error is to make the formula without delegation, for example:
SortByColumns( Filter('[dbo].[Test]', Text('Tes-re') = TextSearchBox1.Text), "Tes-re", If(SortDescending1, Descending, Ascending) )
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
Learn how to build the business apps that you need.