Support Topics Documentation Slack YouTube Blog

REST Console Where request returns Invalid

Hi there!

My REST Console Where request returns Invalid:

{
“code”: 1017,
“message”: “Where clause ‘Joe’ is invalid”
}

What’s wrong with my request?

Thanks!

D

Hello,

What does your where clause look like?

Mark

1 Like

https://api.backendless.com/A400E255-CCEE-BF7F-FF9A-F989AA646400/3A871ECD-F41C-4D1C-AF49-EA3552BA30EA/data/Person?where=Joe

the where clause is just Joe, that’s not a valid one. You can see examples here:

What did you want to do with it?

1 Like

Want to return the query results list to Adalo External Collection request.

A where clause is a condition. It needs to describe what kind of data to get. When you say Joe it is not a condition. Please read the documentation I referenced.

Regards,
Mark

Yes, reading…

Done.

Consider amending this manual:

For instance, this would make it work:

Or, even better:

Thanks for your help, Mark!

When you say “this”, what exactly is the suggestion?

image

That works if the user types in a name like you did, but what if they want a more complex where clause? In that case, your suggestion will not work. In any case, the UIs you configure needs to be adapted to the specific needs of the app.

1 Like

Agreed.

How to configure this on the Backendless side?

Thanks!

D

It is a query sent from the client-side… there is nothing to configure on the Backendless side, it simply processes the query you sent and returns the data

Ok, so did I get it right that the whole configuration of the query - including a more complex where clause - must be done on the client side?

Yes, that’s correct

1 Like

Thank you Mark!

Another stupid question:

I need to have a query sent from Adalo to our API and put the returned list into Backendless table to then return this table to Adalo.

What would be the best way to organize this?

Thank you!

D

To do this you’d use the Backendless API to store objects in the database:

Saving single object:

Saving multiple objects in a single call:

Regards,
Mark

1 Like

…and if the API returns JSON I use this instead, right?

You could, but it has its own consequences. It depends on what you need to do with the data stored in Backendless later.

I need to send it back to Adalo as the query answer.