- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 06:21 AM - edited 12-22-2022 06:37 AM
Hi,
I'd like to have additional comments mandatory when trying to save incident state to on hold. Meaning, it is not possible to save state to on hold unless there's something filled in the additional comments.
I have tried this onChange client script from a different thread, but it doesn't work.
function onChange(control, oldValue, newValue, isLoading, isTemplate) { if (isLoading || newValue === '') { return; } if (newValue == 3) { g_form.setMandatory('comments', true); } }
What did I do wrong?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 06:51 AM
Are people using a UI Action to move it to On Hold? Or are they changing the state manually?
If its the latter a UI Policy is the best option for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 06:51 AM
Are people using a UI Action to move it to On Hold? Or are they changing the state manually?
If its the latter a UI Policy is the best option for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 06:59 AM - edited 12-22-2022 07:00 AM
Hello @JordyZ
Please write the value in quotes
if (newValue == '3')
Please Mark this as Accepted Solution / Helpful if it resolves your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 07:08 AM
Hi @JordyZ ,
For this requirement, Scripting is not required. Instead you can use UI Policy.
Please Check the below snapshots. I tried this in my PDI, it is working.
UI Policy on incident table and When state is on Hold.
UI Actions : Additional Comments - Mandatory True.
Please feel free to ask incase of any queries from the above solution.
Please mark it as correct if it resolved your issue.
Regards,
Deepika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2023 11:10 AM
It is not working. Can you please help me on this?