Look up mutiplicates by RecordNumber not value..

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
arcanebits
Veteran Member
Posts: 71
Joined: 2018-12-10 21:52

Look up mutiplicates by RecordNumber not value..

Post by arcanebits » 2022-05-02 14:36

Hi, been using appgini for a while, now i bump with this silly error, and maybe its something im missing, but
I do use a lookup field, its takes the value and shows up, then I try to calc using it and it just take the record numer not the value...

THIS IS THE CALCULATED FIELD

SELECT
{ `ep`.`notaria` * 1 }
FROM `ep`
WHERE `ep`.`id`='%ID%'

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

Re: Look up mutiplicates by RecordNumber not value..

Post by jsetzer » 2022-05-02 14:40

Lookups and autofills always store the foreign key (the primary key of the parent table)
Kind regards,
<js />

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

User avatar
baudwalker
Veteran Member
Posts: 175
Joined: 2015-02-03 08:08
Location: Bellingen NSW Australia

Re: Look up mutiplicates by RecordNumber not value..

Post by baudwalker » 2022-05-03 01:00

If I read you correctly, its the same problem I had a few years ago.
I hope this may help... viewtopic.php?f=6&t=2618

Regarrds Barry

arcanebits
Veteran Member
Posts: 71
Joined: 2018-12-10 21:52

SOLVED Re: Look up mutiplicates by RecordNumber not value..

Post by arcanebits » 2022-05-04 12:16

SOLVED
Hi again, I was sure I got something wrong since I be using lookup fields for a while without any problems.
As JSetzer said: “Lookups and autofills always store the foreign key (the primary key of the parent table)” I just make a quick fix making the value I need to be a primary key and voila.
And BaudWalker posted a really interesting clue on the issue, even touched by the AppGini creator.
Thanks Guys.

User avatar
hydrald7
Posts: 9
Joined: 2022-04-10 13:42

Re: Look up mutiplicates by RecordNumber not value..

Post by hydrald7 » 2022-05-10 22:03

Hi arcanebits
I'm hydrald7 a brand new AppGini user.

I allow myself to send you this email because I am facing the same problem as you with the calculated fields that we cannot use because the stored value is that of the primary key.

But I saw that you had found a solution, your response of 22-05-04 to JSetzer: "As JSetzer said: “Lookups and autofills always store the foreign key (the primary key of the parent table)” I just make a quick fix making the value I need to be a primary key and voila."

Could you be kind enough, please, to explain your solution more precisely and perhaps attach me an example code.
It would be a big help for me.
Thank you very much for the time you will agree to grant me for the answer.

See you soon maybe and above all be well
Cordially

Post Reply