Backendless Version (3.x / 6.x, Online / Managed / Pro )
You can see everything in the screenshot. I just want to test a simple update method prior to diving into putting more code server-side but I am unable to run my method. Please advise.
There are 2 problems:
How do I indicate that I want to search through the Post table. You can see that I used Get Data From Cache method, but I don’t think that’s right. I have a Post Table, I want to get the entries as a list and iterate through them. OR is there another way that I can do a Query based on the Post ID that I pass in as a parameter from the REST call?
Trying to run the method results in the 400 - Service method not found error.
I changed the endpoint URL path so it is
/Post/ReportPost (without the trailing slash) and now the method can be invoked. The method fails since there are no items in cache, but you can definitely invoke it.
Thanks for the quick reply. How can I put the items in the cache? That’s the other part I don’t understand. If I have a Post table and I want to iterate through them and perform some action on a record, how do I get a list of records?
EDIT: Looking at the example code again, it seems that the example code for the shopping code only processes input before the rest call executes which isn’t quite what I want to do.
To clairfy, this is what I want to do:
a) get a postID string from a REST call
b) iterate through the Post Table
c) stop when I find a matching record
d) modify the record
How can I do this?
If you want to get the records of
Post table you should use the
Load Table objects block under
Data API section.
Something like this:
Thanks. Will page size limit the results? I would need to query the entire table which could easily exceed 100 or 1000 records?
Would it be best to get a table count and then set that to the page size?
If you want to get all the records you should take a look at pagination.
More about it here:
Do you know why I am unable to add a where clasue to the Load Table Object block?
Very confusing as there are no error messages as to why things are wrong.
a where clause must be a string, while the block you’re trying to add is resolved to be a boolean.