Removing Request Status choices for Mandatory tasks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 09:30 AM
Hi All,
Struggling with what should be a straightforward Client Script for HR Task. Our goal is listed below:
- Remove Cancelled/Closed Incomplete for Mandatory Tasks within Activity Set
- Remove Cancelled for Manadatory Ad-hoc Tasks
- Keep both for any Optional Task
With the script below I am able to remove both choices but it only fits one of the scenarios above. I have researched this and have a feeling I am supposed to call an if else statement but do not know what to call for the else.
Table: HR Task
Type: onChange
Script:
Any help would be appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 09:45 AM
Yeah, you might need an else statement and then g_form.addOption functions to add them back.
If the onChange is on the variable ('optional'). You could also use "newValue".
if(newValue != true)