Lookup Field Setup

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
AEmpeno
Veteran Member
Posts: 72
Joined: 2018-01-04 18:48

Lookup Field Setup

Post by AEmpeno » 2021-04-19 19:26

I have three tables:
Cherry -> Sort -> Ship.

I set up all my field names in the "Ship" table as lookup field to "Sort", and I set up all my field names in "Sort" as lookup field to "Cherry". If I picked an id number in the "Ship" table all the lookup field names show the correct value, but once I hit save, it saved all lookup field names saved the id number instead of the actual value.

Does anyone experience this? Am I using the lookup field too much which preventing me to get the correct value?

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

Re: Lookup Field Setup

Post by pbottcher » 2021-04-19 21:02

Hi,

not sure I get your question, but the lookup will always store the ID ( Primary Key) of the table that contains the actual value.
Maybe you can post an example.
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.

AEmpeno
Veteran Member
Posts: 72
Joined: 2018-01-04 18:48

Re: Lookup Field Setup

Post by AEmpeno » 2021-04-19 21:29

Here is the Before SAVE
Attachments
Capture01.PNG
Before SAVE
Capture01.PNG (13.47 KiB) Viewed 1679 times

AEmpeno
Veteran Member
Posts: 72
Joined: 2018-01-04 18:48

Re: Lookup Field Setup

Post by AEmpeno » 2021-04-19 21:29

After SAVE
Attachments
Capture02.PNG
After SAVE
Capture02.PNG (10.15 KiB) Viewed 1678 times

pfrumkin
Veteran Member
Posts: 157
Joined: 2020-02-18 17:58
Location: Albuquerque, New Mexico USA

Re: Lookup Field Setup

Post by pfrumkin » 2021-04-20 15:54

Yep, as @pböttcher said AG will store the id of the record, not the data itself. This makes sense so that you aren't storing data multiple times. You get the bonus that if you change the data, you change in one place and it changes in all references.

~Paul

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

Re: Lookup Field Setup

Post by pbottcher » 2021-04-20 19:37

Hi,

I think this may be related to

viewtopic.php?t=3618

That seems to be a bug
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.

Post Reply