Lookup file with memberId

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
User avatar
amyat
Veteran Member
Posts: 45
Joined: 2020-06-24 20:39

Lookup file with memberId

Post by amyat » 2022-02-03 09:22

want to show lookup field by only created by user(user1 memberId)

Can't use memberId,groupId on Lookup field advanced... area?
table have id , name , created by (default createdby username).

Code: Select all

SELECT id.....From table WHERE `table`.`created_by`=%%memberID%% ORDER BY 2
that is not possible?
was this feature released?

If can't,please give me any other idea :(
just want to show lookup field by only created by him

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1944
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Lookup file with memberId

Post by jsetzer » 2022-02-03 11:19

I have just taken a quick look into ajax_combo.php which is responsible for returning lookup-options.

I can not find any resolving of placeholders in advanced queries' SQL of lookups (AKA: custom_query). So, I guess such a feature of replacing %%VARIABLENAME%% does not exists in standard generated AppGini apps.

There was another forum question here a couple of days ago. There was need for joining a different table and filering by a value of the current record. Also in that question, the answer was: no, but there was a workaround for creating a custom dropdownlist with custom options.

This is the post I am referring to:
viewtopic.php?p=18751&sid=3ae9e6a20c544 ... 476#p18701

This one (see screenshot below) looks like a lookup (because it uses the same Select2 options as all the other dropdowns do), but is a normal <input> field converted into a select box with custom options:

chrome_GSEHZ4asAa.png
chrome_GSEHZ4asAa.png (4.01 KiB) Viewed 1284 times
Maybe this helps.

Another option could be the "[x] Inherit access permissions" flag, but, honestly speaking, I'm not too familiar with this. I hope others can help.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 25.10 + all AppGini Helper tools

Post Reply