@steven: Thanks.
This worked.
Can the code not be tweaked so that it is automatically set to 0 when the Code and Description fields are the same?
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Pizza Tutorial missing in video
-
- Posts: 249
- Joined: Sun Dec 06, 2020 6:50 am
- Location: Chennai, India, Singapore
Re: Pizza Tutorial missing in video
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 448 times
- Contact:
Re: Pizza Tutorial missing in video
Implemented in Dev:
You do not have the required permissions to view the files attached to this post.
-
- Posts: 249
- Joined: Sun Dec 06, 2020 6:50 am
- Location: Chennai, India, Singapore
Re: Pizza Tutorial missing in video
Actually the earlier nuHide() does not work now due to some scope / visibility issue.
@kev1n: Your dev implementation on matching code and description to render the width=0 is good. Also we need to make sure that after the description is set, if the code field changes, the logic should be applied again.
Point me to the actual code / db changes to implement it into the stable branch. This way we can gradually make it easier to understand and merge the newer changes later. Some changes like these generally should not be affected by the dev version dependencies.
Similar bunching and backporting of the following too may be in order - any issues there?
https://github.com/smalos/nubuilder4-De ... be010895ca
https://github.com/smalos/nubuilder4-De ... 9b9ac99c03
@kev1n: Your dev implementation on matching code and description to render the width=0 is good. Also we need to make sure that after the description is set, if the code field changes, the logic should be applied again.
Point me to the actual code / db changes to implement it into the stable branch. This way we can gradually make it easier to understand and merge the newer changes later. Some changes like these generally should not be affected by the dev version dependencies.
Similar bunching and backporting of the following too may be in order - any issues there?
https://github.com/smalos/nubuilder4-De ... be010895ca
https://github.com/smalos/nubuilder4-De ... 9b9ac99c03
-
- Posts: 249
- Joined: Sun Dec 06, 2020 6:50 am
- Location: Chennai, India, Singapore
Re: Pizza Tutorial missing in video
Backported Zero Width when Code and Description are the same in nuBuilder 4.
https://wiki.nubuilder.cloud/ ... _Width_Mod
Form ID: nuform. Append this function in Custom Code. Of course, you could also write an sql query to do that.
Then, execute:
Verify if the objects with nu5bad6cb32e1a66a and nu5bad6cb32e47d18 exist first.
The above SQL can be entered in:
https://wiki.nubuilder.cloud/ ... _Width_Mod
Form ID: nuform. Append this function in Custom Code. Of course, you could also write an sql query to do that.
Code: Select all
function nuSetLookupWidth() {
var w = $('#sob_lookup_description').val() == $('#sob_lookup_code').val() ? 0 : 150;
var cw = $('#sob_lookup_description_width').val();
if (cw == 0 || cw == 150 || w == 0) $('#sob_lookup_description_width').val(w).change();
}
Code: Select all
INSERT INTO zzzzsys_event (zzzzsys_event_id, sev_zzzzsys_object_id, sev_event, sev_javascript) VALUES ('nu5ff0b31354688aa', 'nu5bad6cb32e1a66a', 'onchange', 'nuSetLookupWidth()');
INSERT INTO zzzzsys_event (zzzzsys_event_id, sev_zzzzsys_object_id, sev_event, sev_javascript) VALUES ('nu5ff0b329e242e25', 'nu5bad6cb32e47d18', 'onchange', 'nuSetLookupWidth()');
The above SQL can be entered in:
Code: Select all
Forms =>> nuform => Object List => Object: sfo_code => Input => doubleclick Input Type (and class) => Custom Code
Forms =>> nuform => Object List => Object: sfo_description => Input => doubleclick Input Type (and class) => Custom Code
-
- Posts: 249
- Joined: Sun Dec 06, 2020 6:50 am
- Location: Chennai, India, Singapore
Re: Pizza Tutorial missing in video
The above post is erroneous in some aspects.
Backported Zero Width when Code and Description are the same in nuBuilder 4.
https://wiki.nubuilder.cloud/ ... _Width_Mod
Navigate to:
Of course, you could also write an sql query to do that.
Then, execute:
Verify if the objects with nu5bad6cb32e1a66a and nu5bad6cb32e47d18 exist first.
The above SQL can be entered in:
Backported Zero Width when Code and Description are the same in nuBuilder 4.
https://wiki.nubuilder.cloud/ ... _Width_Mod
Navigate to:
Code: Select all
Home => Forms => nuobject => Custom Code Append this function in the JavaScript pane:
function nuSetLookupWidth() {
var w = $('#sob_lookup_description').val() == $('#sob_lookup_code').val() ? 0 : 150;
var cw = $('#sob_lookup_description_width').val();
if (cw == 0 || cw == 150 || w == 0) $('#sob_lookup_description_width').val(w).change();
}
Then, execute:
Code: Select all
INSERT INTO zzzzsys_event (zzzzsys_event_id, sev_zzzzsys_object_id, sev_event, sev_javascript) VALUES
('nu5ff0b31354688aa', 'nu5bad6cb32e1a66a', 'onchange', 'nuSetLookupWidth()');
INSERT INTO zzzzsys_event (zzzzsys_event_id, sev_zzzzsys_object_id, sev_event, sev_javascript) VALUES
('nu5ff0b329e242e25', 'nu5bad6cb32e47d18', 'onchange', 'nuSetLookupWidth()');
The above SQL can be entered in:
Code: Select all
Objects => sob_lookup_code => Custom Code => Event: onchange | Javascript: nuSetLookupWidth()
Objects => sob_lookup_description => Custom Code => Event: onchange | Javascript: nuSetLookupWidth()