Make checkbox true based on another form's field value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2022 06:43 AM
Hi. I want to make a checkbox "check" true on the incident task form if the category of the incident is "Env" on the incident form.
If someone could help me how can I set a checkbox true based on another form's value.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2022 06:55 AM
Hello,
If you don't mind, can you please share below information?
What have you tried? What is working? What isn't working? Have you tried putting log statements to see where it is reaching ?
Unfortunately, at this point, you may have got requirements and that you've now given to us. Providing solution will resolve your issue but it will not help you to learn.
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2022 07:00 AM
Hello,
You can write Business Rule on "After" and check "Insert" and "Update" on Incident table.
Condition - Category changes to Env
Script -
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var inc = new GlideRecord('incident_task');
inc.addQuery('incident', current.sys_id);
inc.query();
while (inc.next()) {
inc.u_check_box=true; //checkbox name
inc.update();
}
})(current, previous);
Thanks
Akshay Kangankar
Please Mark ✅ Correct/helpful, if applicable,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2022 01:26 AM
Hello,
Did you get chance to look into solution provided by me. Please let me know if you need any help.
If my answer resolved your issue feel free to mark correct as well helpful, so it will be helpful for others looking for similar query.
Thanks
Akshay Kangankar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2022 07:00 AM
Hi,
You can create onChange client script on field Category with below code:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if (newValue == 'env') { // Replace env with actual value stored in category field
g_form.setValue('check_box_field', 'true'); // Replace check_box_field with actual field name of Check box
}
else { // You can remove else block if you dont want to uncheck if the value is not env
g_form.setValue('check_box_field', 'false'); // Replace check_box_field with actual field name of Check box
}
}
Palani