Page 1 of 2
RUN-Button: Open another Form in a new browser window / tab
Posted: Thu Apr 01, 2021 10:07 am
by oli
Dea All,
I'm searching a solution for following problem:
On my form "Orders" I have a RUN object (Button) to open a list of all "Customers".
If I press this button I'm getting forwarded to the customers list but I lose all new updates in the "order" form I did before if the order form was not saved.
Is it possible to force nuBuilder to open the customers list in a new browser tab or window?
BR and thank you!
Oli
Re: RUN-Button: Open another Form in a new browser window /
Posted: Thu Apr 01, 2021 10:29 am
by kev1n
Hi Oli,
Use an object with Type
Input and Input Type (and class)
Button instead.
In the button's Custom Code, add an onclick event:
Code: Select all
nuForm('your_form_ID_here', '-1', '', '', '2');
Parameter 2: record id of the Edit Form or an empty string to display a Browse Form.
Wiki:
nuForm()
Re: RUN-Button: Open another Form in a new browser window /
Posted: Thu Apr 01, 2021 12:26 pm
by kev1n
Re: RUN-Button: Open another Form in a new browser window /
Posted: Thu Apr 01, 2021 5:03 pm
by oli
Works great !!! Thanks a lot!

Re: RUN-Button: Open another Form in a new browser window /
Posted: Thu Apr 01, 2021 5:17 pm
by oli
hmmm ... I was able to change the button and new TAB was opened ... but
after adding a new object to the form (Type: Input or Textarea) I got following error message:
Code: Select all
[0] :
===USER==========
globeadmin
===PDO MESSAGE===
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'sob_run_target' at row 1
===SQL===========
INSERT INTO zzzzsys_object (zzzzsys_object_id, `sob_all_table`, `sob_all_zzzzsys_tab_id`, `sob_all_type`, `sob_all_label`, `sob_all_id`, `sob_all_top`, `sob_all_left`, `sob_all_width`, `sob_all_height`, `sob_all_access`, `sob_all_align`, `sob_all_validate`, `sob_all_cloneable`, `sob_all_zzzzsys_form_id`, `sob_run_target`, `sob_input_type`) VALUES ('6065e2901a15f13', 'auftrag', '6064a389e6ab4ac', 'input', 'Waehrungen', 'auf_waehrungen', '0', '0', '100', '18', '0', 'left', '0', '1', '6062f71c01f5070', 'null', 'text');
===BACK TRACE====
C:\wamp64\www\bts-sandbox1\core\nudata.php - line 399 (nuRunQuery)
C:\wamp64\www\bts-sandbox1\core\nuapi.php - line 68 (nuUpdateDatabase)
The problem is the value 'null' instead of '0' for sob_run_target.
Re: RUN-Button: Open another Form in a new browser window /
Posted: Thu Apr 01, 2021 5:45 pm
by kev1n
Which value did you choose in the Target dropdown?
Re: RUN-Button: Open another Form in a new browser window /
Posted: Thu Apr 01, 2021 5:54 pm
by oli
kev1n wrote:Which value did you choose in the Target dropdown?
I'd like to add a new object with Type = INPUT. So I didn't select any target value.
The workaround is to select any target - even it's no button object.
Re: RUN-Button: Open another Form in a new browser window /
Posted: Thu Apr 01, 2021 6:39 pm
by kev1n
I see, thanks. This should be fixed now.
Download nubuilder4.sql and replace yours and then run update.
https://raw.githubusercontent.com/nuBui ... ilder4.sql
Re: RUN-Button: Open another Form in a new browser window /
Posted: Thu Apr 01, 2021 7:28 pm
by oli
Should I overwrite your nubuilder4.sql with the one in nubuilder-4.5-master coming with the update?
Re: RUN-Button: Open another Form in a new browser window /
Posted: Thu Apr 01, 2021 7:46 pm
by kev1n
You can either pull all files or just nubuilder4.sql (that's the only one that has changed)