Support Topics Documentation Slack YouTube Blog

How to set codeless one to many relations

Hello,

I am trying to establish a one to many relationship between the Users table and a table named dossiers. Both the tables have the username inside.

User table:
image
image

Dossier table:
image
image

The users are already created, i have a form which stores data in the dossiers table, and i want to use codeless logic to add the one to many relationship between Users and Dossiers.

How can i setup a codeless block to use the Add Object Relations?
Can i only use Add Object Relations or do i first start with Set Object Relations?

I have seen all the movies regarding relations but in those movies a new user is created and a relation is set, and i didnt find any movie regarding one to many in codeless.

Hello @Michel_Loriaux ,

Use set or add method depends on what you need. If you want just to add any dossier to the user then you should use add method. If you want to replace relation with new dossiers records then you should use set method.

Could you give me an example of an Add Object Relations codeless block?

Here it is an example how to use set Establish object relations with Codeless - YouTube, the add method should be used in the same way, except it would not erase previous relation

Hi Sergey,

This video shows how to create the user and the relation with the city.
I already have a user and just want to add the relation to the dossiers.
How can i add object relation to an already existing user?

Hope this helps:

Hi Mark,

Thanks, but i still cant get it working, can you have a look?
logic is under the save button in createdossierconsultinw

30960D18-DC9C-C94C-FFD9-AECB1619B200

Please attach a screenshot.

image

children is empty, i just dont know what to put there.

Here’s the problem:

Hi Mark,

Yes i didnt know what to put there, but i managed to solve it.