Page 1 of 1
how can Add membership_groups and membership_users as dropdown list ?
Posted: 2023-12-29 15:32
by xbox2007
hello
good evening everyone
i would like ask how can can add membership_groups and membership_users as dropdown list on My appGini detail view ?
thanks a lot
Re: how can Add membership_groups and membership_users as dropdown list ?
Posted: 2023-12-31 10:13
by onoehring
Hi,
afaik, you can only add usergroups and users from the admin area.
Of course you can build a usermanagement yourself and draw data from AG's own tables and write data back to those tables once changes have been done.
Olaf
Re: how can Add membership_groups and membership_users as dropdown list ?
Posted: 2023-12-31 12:26
by pbottcher
Hi,
maybe you can explain a bit more what you try to achieve.
Per default, those tables are not accessible via the normal AppGini settings. So what you can do is create 2 new tables within AppGini and mirror the setting of the membership_groups and membership_users tables. Then, after generting your app you could drop those tables via sql and create a view towards the original tables. With this you can use the entries from the membership_groups and membership_users tables within the AppGini tables that you generate.
Re: how can Add membership_groups and membership_users as dropdown list ?
Posted: 2024-01-03 13:35
by xbox2007
Dear onoehring , pböttcher
thanks a lot for your comment ,
actual that what i do now i make two tables for group and users
i use this table to add new group and new user for my App
thanks a lot
Re: how can Add membership_groups and membership_users as dropdown list ?
Posted: 2024-01-03 14:09
by onoehring
Hi,
so go ahead like pböttcher suggested. Look at the internal AG tables for groups and users and set up clones of them. Now you can built on that (adding records = adding users, assigning users to groupd etc.)
Then, simply use hooks (after_update, after_delete, after_insert) to synchronize "your" user/group tables with those of AG: Use SQL to
Code: Select all
// pseudo code
update AG_groups ( select * from YOUR_groups )
insert into AG_groups ( select * from YOUR_groups )
update AG_users ( select * from YOUR_users )
insert into AG_users ( select * from YOUR_users )
PS: You probably want to sync groups first.
Olaf
Re: how can Add membership_groups and membership_users as dropdown list ?
Posted: 2024-01-13 11:37
by xbox2007
Dear onoehring , thanks a lot