wuschel_lux
Member
Hi all,
I had some time ago raised a questions, an thanks to the community found a solution (https://fabrikar.com/forums/index.php?threads/design-function-question.50613/#post-264494).
So I have a Parent person, who can register other persons (in a repeated group). So later in a databasejoin element I can show only persons that belongs to the parent one.
Element: databasejoin
Under Data: Selected ID from repeated group
Contact Label: last_name_p,' ',first_name_p
now the tab data-where:
Joins where and/or order by statement (SQL)
Apply where to: public
Apply where when: new
This works fine, so far. But now I would like to have the whole list if I am registered as "Admin" e.g. joomla group "10".
I tryed to play with something like:
but without success. Maybe someone out could help me with the SQL query extension to achieve the result:
- Admin sees all persons if joomla group = 10
- Parent Persons sees only persons belongs to his parent_id
Thanks and BR
I had some time ago raised a questions, an thanks to the community found a solution (https://fabrikar.com/forums/index.php?threads/design-function-question.50613/#post-264494).
So I have a Parent person, who can register other persons (in a repeated group). So later in a databasejoin element I can show only persons that belongs to the parent one.
Element: databasejoin
Under Data: Selected ID from repeated group
Contact Label: last_name_p,' ',first_name_p
now the tab data-where:
Joins where and/or order by statement (SQL)
PHP:
WHERE {thistable}.parent_id = (SELECT mam_user_accounts.id from mam_user_accounts where mam_user_accounts.juser_id = {$my->id})
Apply where to: public
Apply where when: new
This works fine, so far. But now I would like to have the whole list if I am registered as "Admin" e.g. joomla group "10".
I tryed to play with something like:
PHP:
AND "{$my->groups}" IN ("10")
but without success. Maybe someone out could help me with the SQL query extension to achieve the result:
- Admin sees all persons if joomla group = 10
- Parent Persons sees only persons belongs to his parent_id
Thanks and BR