Checklist : OnChange client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 02:52 AM
Hello ,
We need to Add a "Select All" option above the checklist that selects all the checkboxes. When this is selected, have a pop-up that says "By selecting all, you confirm you have gone over each item on the checklist."
For the above requirement, how to configure a client script on the checklist present on sc_task?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 03:22 AM
Hello @Allen Andreas ,
We need to access the checklist item in the above script. If the checklist item "Select all" is selected then we need to show a popup. Is there any means to access a checklist item?
We have created a checklist template as follow:
Checklist on sc_task:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 03:53 AM - edited 04-11-2024 03:55 AM
Hi @Community Alums ,
I checked your problem in my PDI and I got answer I hope this will work for you!
I created onChange client script which works on "select all" variable.
alert("newValue = " + newValue);
if (newValue == 'true') {
alert('By selecting all, you confirm you have gone over each item on the checklist.');
g_form.setValue('st_option', true);
g_form.setValue('nd_option', true);
}if(newValue == 'false') {
g_form.setValue('st_option', false);
g_form.setValue('nd_option', false);
}
Result :
Please mark helpful and correct if it works for you
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 04:20 AM
Hi @Community Alums ,
We cannot fetch checklist backend values as checklist items are not variables. After all, we created a checklist in the checklist_template table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 04:28 AM
@Community Alums ,
Can you send me the template that you added in the image, I'll try it in my PDI
Thanks
Sarthak