Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

Displaying Lookup results in Browse Grid

Questions related to using nuBuilder Forte.
devjr
Posts: 7
Joined: Thu Sep 23, 2021 1:59 pm

Re: Displaying Lookup results in Browse Grid

Unread post by devjr »

Actually I did try that before and it also didn't work - because of another issue which I'm finding now - specifically that I can't seem to get column aliases to work.

So, this will work:
nuBuilder_1_3.jpg
and shows this:
nuBuilder_1_4.jpg
But this won't work:
nuBuilder_1_5.jpg
Can you spot what I'm doing wrong?

Thanks,
Jusitn
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4565
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 529 times
Contact:

Re: Displaying Lookup results in Browse Grid

Unread post by kev1n »

When you press CTRL+SHIFT+I you can inspect the generated SQL statements.
devjr
Posts: 7
Joined: Thu Sep 23, 2021 1:59 pm

Re: Displaying Lookup results in Browse Grid

Unread post by devjr »

Thanks, using this method it shows me that the generated SQL is:

Code: Select all

 SELECT lst_id,lst_subject,test,lst_notes
 FROM lesson_set ls LEFT JOIN term t ON t.ter_id = ls.lst_term
WHERE 1
Therefore I can see that the generated SQL is not using column aliases as I would expect - it is just trying to get a new column called "test" from result set.

It /should/ be:

Code: Select all

 SELECT lst_id,lst_subject,CONCAT(t.ter_year) AS 'test', lst_notes
 FROM lesson_set ls LEFT JOIN term t ON t.ter_id = ls.lst_term
WHERE 1
Am I missing something?

Thanks again.
kev1n
nuBuilder Team
Posts: 4565
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 529 times
Contact:

Re: Displaying Lookup results in Browse Grid

Unread post by kev1n »

It looks like the SQL parser cannot handle that. (You would need a SELECT * FROM (SELECT ...) construct again)

What's the purpose of this CONCAT anyway?

Code: Select all

CONCAT(t.ter_year) AS 'test'
Post Reply