Limit Drop-down list to group entries

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
udennison
Posts: 18
Joined: 2019-10-12 17:34
Location: Trinidad & Tobago

Limit Drop-down list to group entries

Post by udennison » 2021-03-13 02:14

Hi, what do I put in the where clause of the sql query to limit the drop-down list of employees to only retrieve employees that were entered by users in my group. e.g. SELECT * from Employees WHERE `membership_userrecords`.`groupID` = [My Group]. What's the script for [My Group]?

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Limit Drop-down list to group entries

Post by onoehring » 2021-03-13 06:17

Hi,

you can have dependent lookup fields. Do not enter the first usergroup by hand, but select if in a lookup. In the next lookup you are able to see only those values having a match in the other lookup: https://www.youtube.com/watch?v=XQh-9S7yd34

Olaf

udennison
Posts: 18
Joined: 2019-10-12 17:34
Location: Trinidad & Tobago

Re: Limit Drop-down list to group entries

Post by udennison » 2021-03-13 11:02

Thanks for the response. However, there's no dependency like the Category/Books example. And, it's more tedious for the user to select his group for each entry. There is a relation between the Employee table and the `membership_userrecords` by the recordID (EmployeeID). I'm seeking to match the groupID from the latter with that of the current user's group. How do I get the current user group?

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Limit Drop-down list to group entries

Post by onoehring » 2021-03-14 08:10

Hi,

well, sounds like my question here: viewtopic.php?f=2&t=4098 which pbötcher said it's not possible :-(
Please check the feature request (and comments) as well: viewtopic.php?f=6&t=4119

Olaf

udennison
Posts: 18
Joined: 2019-10-12 17:34
Location: Trinidad & Tobago

Re: Limit Drop-down list to group entries

Post by udennison » 2021-03-19 16:43

Cheers, I checked out the posts. Thank you

Post Reply