- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2021 08:43 AM
I'm needing a Catalog Client Script that will automatically place a checkmark in a checkbox variable B when checkbox variable A is check marked.
This probably sounds relatively easy but I am not a heavy coder and not sure where to start.
Thanks,
Brandon
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2021 09:54 AM
You will need to add '' around the true since this is not a boolean.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if(newValue == 'true'){
g_form.setValue('checkBoxB', 'true');
}
}
Try this and see what you get
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2021 09:56 AM
That worked! Thanks, Kris.
Also, thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2022 10:48 PM
Hi you can do this it will helps you
onChange() script set table name and field as checkboxA
Script:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if (g_form.getBooleanValue('checkboxA', true)) {
g_form.setValue('checkboxB', true);
} else {
g_form.setValue('checkboxB', false);
}
}