Page 1 of 1
Look up mutiplicates by RecordNumber not value..
Posted: 2022-05-02 14:36
by arcanebits
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%'
Re: Look up mutiplicates by RecordNumber not value..
Posted: 2022-05-02 14:40
by jsetzer
Lookups and autofills always store the foreign key (the primary key of the parent table)
Re: Look up mutiplicates by RecordNumber not value..
Posted: 2022-05-03 01:00
by baudwalker
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
SOLVED Re: Look up mutiplicates by RecordNumber not value..
Posted: 2022-05-04 12:16
by arcanebits
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.
Re: Look up mutiplicates by RecordNumber not value..
Posted: 2022-05-10 22:03
by hydrald7
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