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

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
sario
Posts: 9
Joined: 2020-05-03 08:35

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

Post by sario » 2020-05-03 17:23

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...

sario
Posts: 9
Joined: 2020-05-03 08:35

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

Post by sario » 2020-05-03 17:50

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

sario
Posts: 9
Joined: 2020-05-03 08:35

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

Post by sario » 2020-05-03 18:16

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

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

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

Post by jsetzer » 2020-05-03 18:32

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.
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 24.10 Revision 1579 + all AppGini Helper tools

sario
Posts: 9
Joined: 2020-05-03 08:35

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

Post by sario » 2020-05-04 04:29

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.

sario
Posts: 9
Joined: 2020-05-03 08:35

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

Post by sario » 2020-05-04 04:41

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

sario
Posts: 9
Joined: 2020-05-03 08:35

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

Post by sario » 2020-05-05 16:18

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.

Post Reply