Request is coming back undefined

I am send a json to backendless API and there is no info in the request it continues to come back undefined. I checked everything i even just Plugged the request block into the log and still get undefined. I sent from thunkable, and postman. I tried to send to Xano and it worked from both. dont know whats going on.

Could you share the details about the request? (URL, headers, body, etc)

Do you send it to your own API Service or a built-in API?

Here are 4 easy steps to get a valid cURL without any guessing:

And btw, it does work - I was able to invoke the method without any issues from the Backendless console and a command prompt window.

i was able to invoke and command prompt also. i said that it keeps coming back as undefined when you try to read the requestbody in the in the API. so it is not triggering my true or false trigger in isRunning, in the database. so i broke it down to see what the problem is. via print statements and loggs and everything is coming back undefined

Well, the problem is in your codeless logic.

I recommend placing ALL your logic into a try/catch block so you can log all the errors

i had that in my create object but it it was coming back with undefined so i just broke it all the way down and started to try a bunch of stuff to see if i could see if anything was happen ill put it back like i had it. maybe someone can tell me what im doing wrong. im knew to database and it not a lot of tutorials on api services. i was taking your advice and tried to do it on my own before send it over to yall to do.

I see you changes the logic of the service. Here’s what the current logic does right now:

  1. Retrieves a collection of objects from the GameClocks table where the objects must match the specified “where clause”
  2. Gets the first object from the collection from step 1
  3. Gets the objectId property from the object from step 2
  4. Creates a new object using the same objectId as the one from step 3
  5. Assigns provided isRunning and gameId values to the new object from step 4
  6. Saves the new object created in step 4 in the GameClocks table

I suspect this is not what you want. Instead you assume you wanted to update the isRunning property for the specified game.

yes i want to update isRunning for the set game. so it may trigger the clock in my UI. The reason i have it getting the objectId is because without it, it will make another game. FYI your a great founder taking out the time to help us figure the platform out.

I created a method (in your app) that does what you want. Here’s its logic:

1 Like

man that is so much cleaner and eaiser, I didnt know i could use bulk update without a bulk of info. Thanks alot for the info. i checked it now it works, but the clock wont start when it happen but the clock works when i flip the switch manually. but im going to try to work on it before i come back to the chat. again great founder and great platform. looking forward to finishing the whole project in backendless.

1 Like

ok i couldnt figure it out. the API works but when you send it the toggle move fro false to true but it doesnt trigger the clock. i made a button in ui builder that does the same thing and it works also. but if i manually toggle it it will trigger the clock. it strange but i wasnt albe to fix it.

Please open a new support topic and describe the issue in detail. We prefer that every support topic stays focused on one specific issue.

Thank you,
Mark