Page 1 of 1

Select Object

Posted: Wed Jan 19, 2022 1:48 pm
by BDemeuse
Hi,

I have added 3 "select" objects in a browse&edit form and I have 2 questions where the 2nd and 3rd values depend on the 1st one
1° why the first value returned by the sql select is a "blank" value ?
2° How can I get the value of the first object to use it in the select of the 2nd and 3rd ones with the "add" function.
It is ok with the edit function (modify) when the record has been created.

Thanks in advance

Bri

Re: Select Object

Posted: Wed Jan 19, 2022 2:01 pm
by kev1n
Hi,

The first option is always empty in nuBuilder.
Use nuSelectRemoveEmpty('select_obj_id') to remove it.

I'm not sure I understand the second question.
With nuRefreshSelectObject() you can refresh select 2 and 3 when select 1 changes.

Re: Select Object

Posted: Wed Jan 19, 2022 2:32 pm
by BDemeuse
Where/which step to use these nubuilder functions? In Javascript ?
in 'Before Edit' seems too soon ?

Thanks

Re: Select Object

Posted: Wed Jan 19, 2022 2:40 pm
by kev1n
nuSelectRemoveEmpty() can be called when the form is loaded (in the Custom Code)
Call nuRefreshSelectObject() in the select's onchange event.

You will also find a demo of cascaded selects at https://demo.nubuilder.cloud/

Re: Select Object

Posted: Wed Jan 19, 2022 3:14 pm
by BDemeuse
What do you mean by when the form is loaded ?
In Custom Code, I see only BB, BE, BS, AS, BD, AD

Re: Select Object

Posted: Wed Jan 19, 2022 3:51 pm
by kev1n

Re: Select Object

Posted: Fri Jan 21, 2022 10:36 am
by kev1n
Please let me know if you need further assistance in this matter.

Re: Select Object

Posted: Fri Jan 21, 2022 11:35 am
by BDemeuse
Thanks Kevin.
I will investigate later because I am still occupied on another development ;-)
However demo.nubuilder.cloud does not work -> Not Found.
Anyway, I will let you know
Regards,

Bri

Re: Select Object

Posted: Fri Jan 21, 2022 11:38 am
by kev1n
This correct link is https://demo.nubuilder.cloud

Re: Select Object

Posted: Thu Feb 03, 2022 3:52 pm
by BDemeuse
Thanks to your explanations and demo, everything are working well :-) :-) and before nuBuilder I never had developed (and learnt) either javascript or php !!
But the adventure is not yet finished ;-)