- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 12:54 PM
Hello everyone,
I'm working on a workflow and in one of my tasks I'm displaying a couple of variables as mandatory. However, if the assigned user decides to close this task as incomplete, I need to make them non-mandatory in order for the user to be able to close it (filling in these variables wouldn't be necessary if the task is closed as incomplete).
- I was planning to use a UI policy but from there, I don't seem to have access to the catalog variables to change them to non-mandatory.
- If I use a Catalog UI policy, then, I don't have access to the state of the CTASK to use it as my condition.
- If I use a UI policy/Catalog UI policy, would it be executed when the user changes the state of the task (without saving it)?
I know that to make fields/variables mandatory, best practice is to use UI policies/Catalog UI policies, but due to above first two points, I haven't been able to. Now I'm thinking about using an onChange script to achieve this but I'd be coding the whole thing (if state is "Closed complete" make them mandatory, if it is "Closed Incomplete", make them non-mandatory) and I'm not sure if this is a good idea.
Any guidance will be greatly appreciated.
Thanks!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 01:03 PM
Hi Miguel,
How is the agent closing the task? Clicking on the UI action or changing the state manually?
If by clicking the Close UI action you can add the client side logic to make fields non-mandatory & if manually, then you need onchange client script.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 01:03 PM
Hi Miguel,
How is the agent closing the task? Clicking on the UI action or changing the state manually?
If by clicking the Close UI action you can add the client side logic to make fields non-mandatory & if manually, then you need onchange client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 03:17 PM
Hello Jaspal,
Thanks for the quick reply. They are manually changing the state using the combo box in the form and then saving. I guess then, I'll have to make the script for this one.
Thanks a lot Jaspal!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2023 12:00 AM - edited 10-28-2023 12:00 AM
Yes, Miguel. Let us know if you need further assistance. If not, you can close the thread by marking suitable answer correct.