Lookup of user

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
andrewlaw
Veteran Member
Posts:30
Joined: 2025-06-11 09:22
Contact:

Lookup of user

Post by andrewlaw » 2025-12-05 16:17

I would like to create a simple task table for users of the system. The only thing I cannot figure out is how to make an "assigned to" field which should be a lookup field that uses the built-in users table (which I believe to be membership_users), storing the memberID but showing the email in the drop-down.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts:1757
Joined: 2018-04-01 10:12

Re: Lookup of user

Post by pbottcher » 2025-12-06 12:11

Hi,

this is not possible with the out-of-the box availabel membership tables.

A possible solution would be that you create a "shadow membership_users table" in AppGini that you can reference as you always do.

To handle this table you would have again two options.

1, replace the newly created table that has been generated via the AppGini interface in the database with a view to the membership_users table.
2, Syn the data in the newly created table to the membership_users table.

Solution 1 should be stable and would not need additional efforts,
Solution 2 requires to program the sync of both tables.

Hope that gives you an idea.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

andrewlaw
Veteran Member
Posts:30
Joined: 2025-06-11 09:22
Contact:

Re: Lookup of user

Post by andrewlaw » 2025-12-08 15:37

Thanks. So I would go into the database, create a view to the membership_users table, but then how does AppGini know to reference the view?

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts:1757
Joined: 2018-04-01 10:12

Re: Lookup of user

Post by pbottcher » 2025-12-08 17:57

Hi,

create the table in Appgini first (e.g. mymembershiptable) with the same settings as the membership_users table. Generate your app,
then go to the database and drop the table (mymembershiptable).
Now create on the database level a view named (mymembershiptable) with select * from membership_users.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

Post Reply