Relations Master - Mission 3

Task: Set Object Relationships with API

I’m not sure how to set up the relation with the “City” table via the cityOfResidence using Codeless.

This is the logic for my button for now:

And how it looks in the frontend:

The first part works fine. The new entry is registered in the “Person” table without errors.

However, I don’t understand how to display a list of choices to set the relation. I tried with the “Set Object Relations” and “Add Object Relations” and using an input field for city. It didn’t work. I also tried to use a “select” option and find a way to load all the available cities there, but I couldn’t find a way to load entries inside the drop-down choices.

How could I do that? :slight_smile:

PS: I already read your documentation here Set/Add Relation with objects - Backendless REST API Documentation and it was invaluable to learn more about the API call itself, but I couldn’t understand how to complete the mission from there.


I solved it by creating an input and fetching the Cities from the other table. The tutorial on how to do it is here: Set options in a select list from backendless database in case someone else needs a bit of help with this one :slight_smile: