Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Adding relation to browse shows no records

Questions related to using nuBuilder Forte.
Post Reply
treed
Posts: 205
Joined: Mon May 18, 2020 12:02 am
Been thanked: 2 times
Contact:

Adding relation to browse shows no records

Unread post by treed »

Hello I'm trying to make a browse screen for a lookup for Organizations that have BinsOut. When the relation is added to the query for the browse screen no records appear. When the same query is run in MyPHPAdmin I get the expected result set. Here's some screen shots of what I'm seeing.
Selection_091.png
Data set that is returned by the query.
Selection_092.png
Query in NuBuilder
Selection_093.png
Blank form. If I go back into the query builder and delete the joined table I'm relating to the OrgID's populate the form as expected.
Am I doing something wrong here???
You do not have the required permissions to view the files attached to this post.
gerese
Posts: 132
Joined: Sun Dec 16, 2018 6:13 pm
Location: România
Has thanked: 30 times
Been thanked: 4 times

Re: Adding relation to browse shows no records

Unread post by gerese »

What error occurs in "nuDebug Results"?

PS
Try to edit in second table column "OrgID" in "Org_ID"
nuBuilderForte .... BIG Like !!!
treed
Posts: 205
Joined: Mon May 18, 2020 12:02 am
Been thanked: 2 times
Contact:

Re: Adding relation to browse shows no records

Unread post by treed »

Ah you're on the right track here. Looks like when nuBuilder creates the query it does not preface the field names with the table names as it shows in the query builder. This means every field name in the system needs to be unique. This will make it really tough to consistently use FK's in a large system.
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Adding relation to browse shows no records

Unread post by kev1n »

treed wrote: This means every field name in the system needs to be unique.
Not necessarily. You can write a SELECT .. FROM .. SELECT statement.

Code: Select all

SELECT * FROM (
SELECT
    test.test_id,
    test.field00,
    test.field01,
    test.field02
FROM
    test
LEFT JOIN test2 ON test2.field00 = test.field00
) T
treed
Posts: 205
Joined: Mon May 18, 2020 12:02 am
Been thanked: 2 times
Contact:

Re: Adding relation to browse shows no records

Unread post by treed »

Thanks for the work around. I was thinking a bit about this last night and is nuBuilder coded this way to support hash cookies?
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Adding relation to browse shows no records

Unread post by kev1n »

treed wrote:is nuBuilder coded this way to support hash cookies?
Yes, you can use Hash Cookies in the Browse SQL.

Or what exactly do you mean / what would you like to do?
Post Reply