cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Yakimo
Level: Powered On

Field name with "-" char

Hi again

 

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

 

Working perfect:

 

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:

Capture.PNG

 

regards,

yakimo

 

 

 

3 REPLIES 3
Community Support Team
Community Support Team

Re: Field name with "-" char

Hi @Yakimo,

 

Thanks for the feedback.

Issue confirmed from my side.

19.PNG

I will send this to the proper team.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Community Support Team
Community Support Team

Re: Field name with "-" char

Hi @Yakimo,

 

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)
     )

25.PNG

Another way is to store the data into a local collection, or switch the App in Offline mode.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Yakimo
Level: Powered On

Re: Field name with "-" char

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 47 members 4,555 guests
Please welcome our newest community members: