multiple lookup fields

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
User avatar
baudwalker
Veteran Member
Posts: 188
Joined: 2015-02-03 08:08
Location: Bellingen NSW Australia

multiple lookup fields

Post by baudwalker » 2022-02-22 00:45

I have a database with over 1000 members. Each member has a selection of items to choose from. This list of selections may be different for each member.

Using a "magic file" to place the contents of a field into a multiple choice lookup field is great for one list but can it be implemented so it would use the contents of separate fields according to ownership to create a multiple choice lookup?

Barry

kerelov
Veteran Member
Posts: 42
Joined: 2020-04-17 21:20
Location: Bulgaria

Re: multiple lookup fields

Post by kerelov » 2022-03-03 12:05

Hi,
If I have understood you correctly you need to show a different multi choice list to each user according to his permissions.
If the number of lists is finite and you don't have to add dynamically new lists there is an easy solution to your problem.
You just need to add all lists to the table and hide the ones that the user does not have access to. You can do that with jQuery, an AJAX call and Appgini Helper Library and you must implement it in the TABLENAME-DV.js file. You will need to hide them also in table view and you will need similar script in the TABLENAME-TV.js file. For hiding the fields you can also use the fields permission extension by onoehring but it aslo need Appgini helper Library:
viewtopic.php?t=3308

Post Reply