Dropdown Filter only own data? How.

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
preditor
Posts: 3
Joined: 2014-03-17 12:42

Dropdown Filter only own data? How.

Post by preditor » 2014-03-17 12:54

Hi There. Can someone help me with this? I need to get help on this query. A want to show only owned data form a dropdown box. Now it shows all record from every user in it but i need to let is show only the data to the user how insert the data.

This is the Advaced lookup option box:

Code: Select all

SELECT `mc_werknemers`.`ID`, `mc_werknemers`.`mc_naam` FROM `mc_werknemers` LEFT JOIN `config_veld_functie` as config_veld_functie1 ON `config_veld_functie1`.`ID`=`mc_werknemers`.`mc_functie` LEFT JOIN `config_veld_contract` as config_veld_contract1 ON `config_veld_contract1`.`ID`=`mc_werknemers`.`mc_contract` ORDER BY 2
All the data from the name field is shown, but i'm logged is as a "username" and it show all data in the drupbox form alle users. Now i did try this like the coding here :

Code: Select all

SELECT `mc_werknemers`.`ID`, `mc_werknemers`.`mc_naam` FROM `mc_werknemers` LEFT JOIN `config_veld_functie` as config_veld_functie1 ON `config_veld_functie1`.`ID`=`mc_werknemers`.`mc_functie` LEFT JOIN `config_veld_contract` as config_veld_contract1 ON `config_veld_contract1`.`ID`=`mc_werknemers`.`mc_contract` WHERE `membership_users`.`memberID`=`mc_werknemers`.`mc_ingevoerd_door` ORDER BY 2
Please advice!
THanks you

preditor
Posts: 3
Joined: 2014-03-17 12:42

Re: Dropdown Filter only own data? How.

Post by preditor » 2014-03-18 15:56

Please advice!

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: Dropdown Filter only own data? How.

Post by a.gneady » 2014-03-18 20:03

Hmm .. you don't need to write a customized query for this purpose. You should check the option "Inherit access permissions". This will limit the contents of the dropdown to only the items the current user can access.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

preditor
Posts: 3
Joined: 2014-03-17 12:42

Re: Dropdown Filter only own data? How.

Post by preditor » 2014-03-19 11:46

Thank you I try this out. Thanks again. :D

Post Reply