Advanced wuery for look up

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
User avatar
jmcgov
Veteran Member
Posts: 81
Joined: 2018-12-19 01:31
Location: Northern Ireland

Advanced wuery for look up

Post by jmcgov » 2024-03-01 00:05

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?

User avatar
jmcgov
Veteran Member
Posts: 81
Joined: 2018-12-19 01:31
Location: Northern Ireland

Re: Advanced wuery for look up

Post by jmcgov » 2024-03-02 17:19

Any thoughts anyone?

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

Re: Advanced wuery for look up

Post by pbottcher » 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.
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.

User avatar
jmcgov
Veteran Member
Posts: 81
Joined: 2018-12-19 01:31
Location: Northern Ireland

Re: Advanced wuery for look up

Post by jmcgov » 2024-03-04 16:15

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?

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

Re: Advanced wuery for look up

Post by onoehring » 2024-03-09 11:24

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

User avatar
jmcgov
Veteran Member
Posts: 81
Joined: 2018-12-19 01:31
Location: Northern Ireland

Re: Advanced wuery for look up

Post by jmcgov » 2024-04-01 03:58

Thanks @olaf. Will try to modify those files from hooks

Post Reply