Connect relationship object to build-in property


I have Object A.

In Object A, I’ve added a property whose value is derived from Object B.

Currently, I am examining the relationship of Object B.

I want to **add** the relationship object to build in property A.

On the other hand, when I delete the relationship, it should also remove the values from the properties.

I have a property calculation, but none of my attempts have been successful so far.