Page 1 of 1

lookup auto-fill is not showing properly when we make a lot of lookup multiparent on table view and detail view

Posted: 2020-05-03 17:23
by sario
Hi all. This is my first post on the forum. I'm a big fans of appgini apps. I have been use this since the last 1 year.

I found some bug that is very strange. The lookup table view is not showing properly. Instead of showing the "parent caption field part 1", the table is only showing parent table ID from the looked up table primary key.

this bug is not showing if we don't have many auto-fill lookup field with multilevel parent. but when we already make a lot of table with multiple lookup (reference to my sample project apps-described below), it become error and not showing the lookup properly. if we only make 2-3 lookup leveling, it's still fine. the bug error showing after around 7-9 leveling of lookup.

Currently I use the appgini version 5.82. I make a sample app freshly using appgini tools, and the sql database also made from appgini. This sample project is specifically made for the understanding of this bug. I upload the project file and generated file in this forum for reference. the username : admin, password : admin. please check the leveling_display tab. the bug is found there.

here is the file : https://www.dropbox.com/s/3thqvk2oimcgp ... t.zip?dl=1 (I upload it to external host because it's a little big)

you can try to upload this project to localhost and import the sql file to database named leveling_list
The DB username is root and the DB password is : (null).

Here is some screenshot of the apps :

Image


Image


Image


Image


Image


Image

the bug is found on table level display 3, etc. the display is showing primary key of looked up parent primary key. it suppose to show : jack level 1


Image

this also. in the project file, you can see level display 5-6-7-8-9-10 also.

Thank you all...

Re: lookup auto-fill is not showing properly when we make a lot of lookup multiparent on table view and detail view

Posted: 2020-05-03 17:50
by sario
for easier trial, i host the apps on the live online server


please check it here : http://178.128.25.14/leveling_list/index.php
username : admin
password : admin

do whatever you need to do. it's just a sample project app to describe this bug easliy.

Thank you

Re: lookup auto-fill is not showing properly when we make a lot of lookup multiparent on table view and detail view

Posted: 2020-05-03 18:16
by sario
here is the snap of gif (sorry I don't know how to embed it to this forum) : https://gifyu.com/image/lPrr

at first it showing perfect, than it turn into number rather than parent caption auto fill looked up

Re: lookup auto-fill is not showing properly when we make a lot of lookup multiparent on table view and detail view

Posted: 2020-05-03 18:32
by jsetzer
I'm sorry if I do not know or understand your specific usecase. From my experience I'd like to recommend a different approach than yours. Maybe you only need a parent_id field. This allows you to build an (almost) unlimited depth of hierarchical levels.

id; parent_id; name
1; null, "root"
2; 1; "level 1"
3; 2; "level 2"
4; 3; "level 3.a"
5; 3; "level 3.b"
etc.

I recommend another field named "path" which can be (a) a calculated field automatically merging the parent's path with the own name or (b) populating every record's path after insert/after update using SQL.

id; parent_id; name; path
1; null; "root"; "/"
...
4; 3; "level 3.a"; "/ level 1 / level 2"
...


From my experience it is no good idea to have so many redundant and non-normalized fields in one table. But as I said before: maybe your usecase is something special. Just want to share my impression and experience.

Re: lookup auto-fill is not showing properly when we make a lot of lookup multiparent on table view and detail view

Posted: 2020-05-04 04:29
by sario
wow. thank for you very much for the fast response.
Maybe you only need a parent_id field.
no, that's the actual problem. in the table view and detail view, only showing the the parent primary key, instead of parent caption look up.


actually in these link :
http://178.128.25.14/leveling_list/level_10_view.php
http://178.128.25.14/leveling_list/level_9_view.php
http://178.128.25.14/leveling_list/level_8_view.php
etc
is already right (no bug/error), because it's showing all the lookup autofill caption perfectly until this so deep nested lookup.




the problem is in these link:

http://178.128.25.14/leveling_list/leve ... 3_view.php --> the bug is starting here. so the other lookup bug is following the error. level 1 name, only showing level 3's primary key (parent id). level 2 name is already right. it's show the level_3_name's parent table look up caption as "jack level 2". I have choose the field level_1_name as lookup pointed to level 3 table , parent caption field part 1 to level_1_name and it should displaying "jack level 1". but it's showing "1" as level_3_name's primary key.



http://178.128.25.14/leveling_list/leve ... 4_view.php --> level 1 name, level 2 name, only showing level_4_name's primary key (parent id). level 3 name is already right. it's show the level_4_name's parent table look up caption as "jack level 3".

http://178.128.25.14/leveling_list/leve ... 5_view.php --> level 1 name, level 2 name, level 3 name, only showing level_5_name's primary key (parent id). level_4_name is already right. it's show the level 5's parent table look up caption as "jack level 4".

etc...

the error keep showing until http://178.128.25.14/leveling_list/leve ... ay_10_view

it's so confusing, because before it's showing the caption perfectly until I make a lot of nested lookup table and this bug keep showing. thanks for your time.

Re: lookup auto-fill is not showing properly when we make a lot of lookup multiparent on table view and detail view

Posted: 2020-05-04 04:41
by sario
maybe you can try to insert in this table : http://178.128.25.14/leveling_list/leve ... 1588566901 and see what happen. before you press "save new", it's showing the caption right. after press the "save new", the level display 1 is back to showing the level_3_name's primary key. that's the bug point that I mean here.

NB : username : admin
password : admin

Re: lookup auto-fill is not showing properly when we make a lot of lookup multiparent on table view and detail view

Posted: 2020-05-05 16:18
by sario
I have been tried to uninstall the appgini apps, installing the new downloaded appgini 5.82 then create the new project again with the same scheme, and the bug is appear again. the nested lookup is not unlimited. please someone help. Thank you.

Re: lookup auto-fill is not showing properly when we make a lot of lookup multiparent on table view and detail view

Posted: 2025-06-04 09:45
by changia
This issue still persists and has not been fixed yet.

Table Leads has all primary data Lead Id example - 567
Table Customer is a lookup table for Leads (Like Lead ID, Lead Name, Lead Phone etc.) Customer ID - 456

Now there is this 3rd table called Sales
And here we are making Customer table as look up table so it picks 456 as ID but when name and phone is picked the drop down shows correctly but when the record is being saved the value becomes 567 instead of actual name which is stored in Leads table.

Please help with a workarond to fix this immediately.