Checks if a parent table has a relative record in a child table
Posted: 2021-05-15 17:01
Hello everybody.
I have a "parent_table" table which has two child tables named "child_table_1" and "child_table_2"
I need to create a "fill child table 1" button that appears only if there are no child records of the linked record in the "parent_table" table in the table "child_table_1".
To be clearer:
The "parent_table" table contains enrollments for a training course (one enrollment for each enrollee).
The "child_table_1" table contains the end-of-course questionnaire.
At the end of the course, when a participant opens their record in the "parent_table" table, they must see a "fill child table 1" button which will disappear when the participant has filled in the "child_table_1" relating to the specific course.
I ask for help setting the right code in the hook file!
THANK YOU!!!
Fabiano
I have a "parent_table" table which has two child tables named "child_table_1" and "child_table_2"
I need to create a "fill child table 1" button that appears only if there are no child records of the linked record in the "parent_table" table in the table "child_table_1".
To be clearer:
The "parent_table" table contains enrollments for a training course (one enrollment for each enrollee).
The "child_table_1" table contains the end-of-course questionnaire.
At the end of the course, when a participant opens their record in the "parent_table" table, they must see a "fill child table 1" button which will disappear when the participant has filled in the "child_table_1" relating to the specific course.
I ask for help setting the right code in the hook file!
THANK YOU!!!
Fabiano