Page 1 of 1
Advanced wuery for look up
Posted: 2024-03-01 00:05
by jmcgov
Hi Ahmed and Appgini'rs
When I insert a look up field in a table, I have the option to
- inherit permissions, OR
- do an advanced query
Problem is, I want to only records that
- a field called ADDRESS with a value > 0, AND
- a field called USERNAME with a value that == the logged in username
Can I do that?
Re: Advanced wuery for look up
Posted: 2024-03-02 17:19
by jmcgov
Any thoughts anyone?
Re: Advanced wuery for look up
Posted: 2024-03-03 21:03
by pbottcher
Out of my knowledge that is not possible, as you cannot access the logged in username at the moment that advanced query.
Re: Advanced wuery for look up
Posted: 2024-03-04 16:15
by jmcgov
pböttcher wrote: ↑2024-03-03 21:03
Out of my knowledge that is not possible, as you cannot access the logged in username at the moment that advanced query.
OK, thank you.
I winder if I could create a hook routine that would find and replace the query - do you know where it is stored?
Re: Advanced wuery for look up
Posted: 2024-03-09 11:24
by onoehring
Hi
in a quick test my "advanced query" was stored in two files:
/admin/incFunctions.php
and
/ajax_combo.php
This would be my point of intervention: Instead of returning the advanced SQL built that SQL in place and grabbing the current user. Sound possible to me.
Olaf
Re: Advanced wuery for look up
Posted: 2024-04-01 03:58
by jmcgov
Thanks @olaf. Will try to modify those files from hooks