Announcement

Collapse
No announcement yet.

Bidirectional relationships for an entity with itself

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bidirectional relationships for an entity with itself

    I have an Entity called "Technology"

    I want to add a Relationship with itself called "Alternatives" so that when link record is added from one to another, that the same reverse is added.

    I tried creating a Many-to-Many relationship and naming both the left and the right with the same name and label, which work to the point that it only shows one row in the Relationships table.

    But then, when adding a link from one to another, when I go to the other, I also have to separately add a link back.

    I wonder what I'm missing because this would seem to work when linking different Entities?

  • #2
    I think you should modify relation and click there on left side(which will be source) that field should be connected? Something like that, there are two checkbox, is field is audited and this other one. This should be connected, then you'll be able to add records in edit view, and in relations panel you'll se only connected records, to that specific records. I hope you understand what i mean

    Comment


    • #3
      Hey, thanks for considering. I understand but maybe my question needs pictures may help show the objective and result when using Many-to-Many with both sides using the same field name. If I don't use the same field name, I just end up with the same issue but 2 x Bottom Panels, using the same field name results in one bottom panel but the bi-directional association still doesn't happen.

      You see when I add "Campaign Monitor" as an alternative to "Active Campaign" it adds on the "Active Campaign" record but doesn't reciprocate bu showing "Active Campaign" as an alternative to "Campaign Monitor".

      Comment


      • #4
        I am also interested in this kind of bidirectional syncing.... I have a 'Product' entity that "integrates with" other Products. My current approach is to use Formulas to copy the productLeftIds over to the productRightIds on save, but that doesn't work well.

        In a LinkMultiple field, what kind of value is the productLeftIds? An array? JSON? I think if I get both the left and right id lists into arrays and merge them, I could save the combined list back to both left and right.

        Comment


        • #5
          Hi has anyone figured this out yet? I have a similar problem and would need help with it please.

          Comment


          • #6
            Just tested creating a n:n relationship in an entity with itself and it worked out of the box without problems. In foreign entity put in the current entity, the relationship fields automatically will be created, named entityRight and entityLeft.
            Place the field entityRight into your Layout and you wll have the possibility to choose other records of that entity, which are related to the current one.

            I use it for an entity called sources, where I am able to show all related sources to a certain given source.

            Comment

            Working...
            X