Welcome to the nuBuilder Forums!

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

Errors opening forms with IFRAME and GRID

Questions related to customising nuBuilder Forte with JavaScript or PHP.
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Errors opening forms with IFRAME and GRID

Unread post by kknm »

jur_data
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Errors opening forms with IFRAME and GRID

Unread post by kev1n »

To get rid of the error, try changig this line:

from:

Code: Select all

$s = "SELECT `$f->primary_key` $f->from WHERE (`$R->sob_subform_foreign_key` = '$R->subform_fk') $w $f->order";
to:

Code: Select all

$s = "SELECT `$f->primary_key` $f->from WHERE (IFNULL(`$R->sob_subform_foreign_key`,'-1') = '$R->subform_fk') $w $f->order";
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Errors opening forms with IFRAME and GRID

Unread post by kknm »

I can't check right now...
So the SELECT field worked?
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Errors opening forms with IFRAME and GRID

Unread post by kev1n »

kknm wrote: Sat May 25, 2024 6:55 pm I can't check right now...
So the SELECT field worked?
Yes, it is showing values.
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Errors opening forms with IFRAME and GRID

Unread post by kknm »

I checked - everything works correctly!!!
Thank you!

It’s just not clear why the SELECT field failed again. This is not the first time it has failed me.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Errors opening forms with IFRAME and GRID

Unread post by kev1n »

In my experience, if there is an error somewhere in the form, the select fields will not be populated, perhaps its SQL query will not be executed at all. However, I need to investigate why this is happening.
Post Reply