Hi everyone,
I'm struggling to relate using a flowchart 2 records that are related in a many-to-many relationship. This works perfect when the relationship is unique on one side, let me show it to you.
In this case, we have an entity called Student, that relates to many Courses, at the same time those courses relate to many students so that's a many-to-many relationship.
We do have too an entity called Participation that has all the information of the student relative to the course (grades, attendance, etc), and that's related to Student as 1 Student / N Participations, and N Participations / 1 Course.
When I try to relate the records using a flowchart and the formula from the advanced pack, I get that the 1-N relations are done properly using the following:
record\relate('Student', id, 'participations', $pcID);
record\relate('Course', $cId, 'participations', $pcID);
But it's not working, and not logging an error when using the same formula for N-N relations:
record\relate('Student', id, 'courses', $cId);
Am I doing something wrong? is there another way of doing this in this case? I can't use the system relation as I am checking a list I get from elsewhere and I need to do it by scripting and an interator...
Thanks for the help!
I'm struggling to relate using a flowchart 2 records that are related in a many-to-many relationship. This works perfect when the relationship is unique on one side, let me show it to you.
In this case, we have an entity called Student, that relates to many Courses, at the same time those courses relate to many students so that's a many-to-many relationship.
We do have too an entity called Participation that has all the information of the student relative to the course (grades, attendance, etc), and that's related to Student as 1 Student / N Participations, and N Participations / 1 Course.
When I try to relate the records using a flowchart and the formula from the advanced pack, I get that the 1-N relations are done properly using the following:
record\relate('Student', id, 'participations', $pcID);
record\relate('Course', $cId, 'participations', $pcID);
But it's not working, and not logging an error when using the same formula for N-N relations:
record\relate('Student', id, 'courses', $cId);
Am I doing something wrong? is there another way of doing this in this case? I can't use the system relation as I am checking a list I get from elsewhere and I need to do it by scripting and an interator...
Thanks for the help!
Comment