How do I update a record (Date/Time) in Backendless with REST API | Backendless x Appgyver

Hello everyone! I am relatively new to appgyver and the scene in general. I was working on a beginner project that tracks who was the last one to go for a walk with our dog. I already have the register and login part done and it works perfectly (thanks to this guide).

However I want to store (as they press a in-app button, specific for the logged in user) the last time Person A has gone for a walk (Date/Time) without creating a completely new record in Backendless. It should just know who went out (the already logged in user) and then update their old value.

Also I would love to know who has not been for a walk for the longest time, so I need every useres name and last walk day. I could not figure that out too :sweat_smile:. But that might be a question for a different thread.

I am sorry if this is obvious but I’ve tried but could not figure it out. It would be a real blessing if you could help me :grinning_face_with_smiling_eyes:

Best regards,
Yannik B.

Hi Yannik! Your user table in backendless could have a lastWalk field that you update, setting the value as NOW() with a formula function every time the user goes for a walk.

However, if you want a user to be able to see stats from others’ walks (like displaying the name of the person who has not been for a walk in the longest), you could create a separate “Walks” table in Backendless, where you have fields like userId and lastWalk, and then fetch the info and make the lastWalk updates there.

Hey Mari, i will try that! Thank you for your help

1 Like