[Solved] Update Data in parent-child relation

Greetings,
i have multiple collections, which have reference fields to another collection. For example a User-Collection has a reference field to the Asset-Collection and this collection has a child-of field to the first collection.
Now I have two events. The first event is when i add a new asset, so im using the Save Data option and everything works fine. The asset gets created and the user which the asset belongs to contains the new asset in the reference field in the User-Collection.
In the second event i only want to assign a new user to the asset. In this case im using the Update Data option. But now only the data in the asset collection gets updated but not the reference fields in the User-Collection.
What am i doing wrong or why is it working when i save the data but not when i update the data?
Thank you!

1 Like

Hi @KN02,

Looks like we will need to check this as i know that we create the parent-child relationshing while creating new data, but i am not sure if we handle the same while updating the data.

Let me get this checked with the team and get back to you on this.

Thanks.

1 Like

@vishsahu Thank you for the response. Looking forward for your answer.

Hello @vishsahu,
i don’t want to bother you but i was wondering if you have checked on the topic.

Hi @KN02,

Sorry for the delay here.

Yes, we have checked this and while it is supported to create the parent-child relationship while creating the new record, it is not there while you are updating the record.

Probably we couldn’t understand the use case where you need to adding the relationship while updating because in most of the cases the relation should be created at the first time itself.

We have assigned the task to our tech team and it will be there in the next release.

And don’t worry aboutt bothering me :slight_smile:

Thanks.

Sounds great @vishsahu.
Thank you

1 Like

Hi @vishsahu

the problem was solved but now it is not working anymore. So when i update the data in one collection it wont update the data of the parent or child field in the second collection.

Hi @KN02,

The way it should work is you create a new record and assign the parent to it while creating it as a child cannot exists without the parent.

In your use case i am seeing that you are creating the child and then assigning the parent in an update event (which we haven’t thought of as a use case).

Thanks.

Hi @vishsahu,

thank you for the response.
Am i understanding right, that it only works with the save event? So i would have to create a new asset, for example every time the assigned user changes, to update the parent field in the user collection.
Do you plan on integrating this feature or is there any work around without creating a new record every time.

Thanks

Hi @KN02,

In your use case i am seeing that you are changing the parent everytime the object gets updated, so you will need this feature to solve your use case.

I am not seeing the work around and the only option is either you create a new record every time or we add the feature to update the parent in case of Update event. We haven’t yet picked this task yet and once we start it, it will take approx a week to make it available for you.

Thanks.

Thank you @vishsahu .
You are doing great work.

1 Like

Hi @KN02,

We have implemented this feature now. So i think it should work fine for your use case.

Sorry for the delay as this task took a backseat due to other high priority tasks.

Thanks.