Cannot remove apostrophe in a whereClause

Hi there,
I am trying to remove an apostrophe from a whereClause in Codeless, but for some reason it is not working.

Here is what I am doing:

I am receiving code 1017 Where clause 'tutor_name = 'Brandy O'Donnell'' is invalid.

Indeed, the tutor_name is Brandy O’Donnell. I have checked that the replacement block is a double apostrope (‘’) and not a quotation mark ("). With other tutor names that contain apostrophes, I do not have this issue, the RegExp block works fine.

In the console, the double apostrophe works:

Any thoughts?

Hi, @Andreas_Marinopoulos

In order to search for this query you need to use two single quotes in the replacement field. According to the documentation:

https://backendless.com/docs/rest/data_search_with_where_clause.html

There might also be a problem with exactly what you are sending, so I would suggest that you log the getproperty data.

Regards,
Marina

Hi Marina,
this is what I am doing.

This
image

prints this:

Brandy O'Donnell

and this
image

prints this
Brandy O''Donnell

which is exactly what I need going into a where clause.

But then this

throws this:
Error: Where clause 'tutor_name = 'Brandy O'Donnell'' is invalid

Hello @Andreas_Marinopoulos

I see you use “tutor_name” in where clause in Load Table objects block, but i dont see column “tutor_name” in your table

If that doesn’t solution, could you provide us with your app ID

Regard, Viktor

Hi @viktor.liablin , there’s a tutor_name column in the tutors table

It’s the 2 apostrophes at the end of the where clause that are causing the error.

App ID: 4A47197B-AE30-FA84-FF56-0071F4010900

1 Like

@Andreas_Marinopoulos

Which service is using this?

https://develop.backendless.com/brilliant_grades/bl/codeless/services/86FD5A96-0A9F-ADD5-FF0F-AA69C1C31900/updateTutorsSlots

1 Like

@Andreas_Marinopoulos

I’ve created same tables and logic and names in my app and this logic works good.
Can I use “invoke” in your service? Is it safety for your data?

Yes it is @viktor.liablin , only you will need a data set. I will send it to you on slack DM

@Andreas_Marinopoulos

I’ve created in your app service “BackendlessSuportTesting” to test the logic with your Tables
And this logic works fine here. Can you check it?

Regard, Viktor

Indeed, it works in your service but not in mine, despite the code being identical. Is this some sort of bug? How do I prevent it from happening? What shall I do to solve this in production?

I would recommend gradually removing logic from your implementation until it starts working. There’s got to be a problem somewhere in there