Page 1 of 1

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

Posted: 2021-08-26 05:21
by onoehring
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 1900 times
Setting in AG:
lookup_settings.png
lookup_settings.png (31.9 KiB) Viewed 1900 times
A bug - or am I doing something wrong. I am pretty sure, it worked before 5.97

Olaf

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

Posted: 2021-08-26 05:32
by onoehring
Hi,

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

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

Posted: 2021-08-26 16:28
by onoehring
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