5.97: lookup custom query HTML not displayed in lookup, but base field

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

5.97: lookup custom query HTML not displayed in lookup, but base field

Post by onoehring » 2021-08-26 05:21

Hi,

I am saving some HTML in a field (rich text html in that specific table) to use formating etc.
In my custom sql for the lookup in another table I am pulling the ID and the HTML. The custom SQL is quite simple:

Code: Select all

SELECT el.ID, Concat(el.loadcode, ': ', el.treepath) AS Loading FROM el ORDER BY el.treepath, loadcode
The values returned (in phpmyadmin) look like this:

Code: Select all

ID_containerladung	Loading 
316	101: <a href="/e_c_view.php?SelectedID=3222">P77777</a> > <a href="/e_l_view.php?SelectedID=316">101</a>
317	102: <a href="/e_c_view.php?SelectedID=3222">P77777</a> > <a href="/e_l_view.php?SelectedID=316">101</a> > <a href="/e_l_view.php?SelectedID=317">102</a>
318	103: <a href="/e_c_view.php?SelectedID=3222">P77777</a> > <a href="/e_l_view.php?SelectedID=316">101</a> > <a href="/e_l_view.php?SelectedID=317">102</a> > <a href="/e_l_view.php?SelectedID=318">103</a>
As we can see: The data is nicely stiched together.

Not I want to show the field Loading (which exists in my custom lookup) in the lookup - which works, but when the lookup is closed, the value from the field of the child table is shown - instead of the one with the matching ID from the custom query (with the same column name)
In the current 5.97 version of AG the lookup fails to show the html, it looks like this:
lookup_data.png
lookup_data.png (21.52 KiB) Viewed 982 times
Setting in AG:
lookup_settings.png
lookup_settings.png (31.9 KiB) Viewed 982 times
A bug - or am I doing something wrong. I am pretty sure, it worked before 5.97

Olaf

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: 5.97: lookup custom query HTML not displayed in lookup, but base field

Post by onoehring » 2021-08-26 05:32

Hi,

probably the correct title for this bug could be: "custom lookup query does not match requested column title"?
Olaf

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

NOT A BUG! Re: 5.97: lookup custom query HTML not displayed in lookup, but base field

Post by onoehring » 2021-08-26 16:28

Hi,

this is NOT A BUG, but my fault.
This thread can be removed I think.
I chose the wrong field to be displayed. The field I chose was not available from the advanced custom sql, thus AG took it from the original table as it seems. My bad, I am sorry if I wasted your time reading my "problem".
Thank you all anyways.

Olaf

Post Reply