Make review and closed state mandatory but display default system error message only in closed state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-29-2022 01:05 PM
I have a few fields on my incident form I did like to make mandatory. The requirement is to make those fields mandatory as soon as I select review state on the form with no system message displaying and if I ignore the message and select closed, for the fields to remain mandatory and then immediately show the message.
My solution was to do a UI Policy with state is on of review /closed but the message is showing up as soon as I select review. How can I get that message not to show on the review state but only on the closed state
I have included a screenshot of where the system message shows on the form plus my ui policy
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-29-2022 02:08 PM
I was thing first do an onChange client script for the review state and then follow up with a UI policy on the close state

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-29-2022 02:11 PM
Hi,
Thanks for providing more information.
The issue I'm having with understanding is why is the errorMessage showing with that field being mandatory...the problem?
If you walk it back one more step, the problem is probably that the field is mandatory and they don't want to be prevented from saving the record. It's not really that the message appears up there, right? Because that doesn't make a lot of sense.
It's a problem because they want to not supply the field value then (sometimes) and don't want to see the message and want to be able to save and move on, right?
If so that is the case, then you'd need to remove the message from showing by removing the mandatory nature in the irrelevant state.
If you make the field mandatory, whether in Client Script or UI Policy, that message will show either way. The overarching thing is the field(s) being mandatory. That's what causes the message to show.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-29-2022 02:17 PM
Both states are relevant sir, that is where the problem is. I can easily remove the mandator nature from the irrelevant state but that is where I am running into a road block with them. The want it mandatory in both states and but there problem is they don't want to message showing till the select the closed state.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-29-2022 02:25 PM
Hello,
Alright, well, we're going in circles at this point.
It's not clear why the message at the top of the form is that bothersome to them. It's bothersome because the field(s) is mandatory and they didn't supply a value. The message only shows when they go to save the form. If you removed the message...the field is still mandatory and then they wouldn't know why they can't save. The form would just sit there.
So...as I've said several times, the bigger issue is not the message, it's the mandatory nature of the field.
If I told you how to hide that message, and that was it, you'd be fine and so would they?
When the form would just sit there and you don't know why it didn't save?
I find that hard to believe, haha.
The only way to prevent that from showing is to remove the mandatory nature of those field(s). You can interject a last minute removal of the mandatory nature by using this in client script, example:
var fields = g_form.getEditableFields();
for (var x = 0; x < fields.length; x++) {
if (g_form.getValue('state') == 'whatever_review_state_value_is' && fields[x] == 'name_of_field') {
g_form.setMandatory(fields[x], false);
}
}
But the overall solution is to remove the mandatory nature...
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-29-2022 04:34 PM
Hi Cynthia
Need to define what "mandatory" means in the question. "Mandatory" implies the field needs to be entered before moving to the next step. That's why the message is displaying in the "Review" state because the fields were set to be "Mandatory" by the UI Policy.
Yet, the question seems to say that users should not be able to fill these fields and yet move to the "Closed" state. That is, these fields shouldn't be made "Mandatory". Is the real question on how to mark labels with a red asterisk to warn users to be prepared to enter them when they try to "Close" the form? If so, the question is not on making these fields "Mandatory" in the Review state but changing the labels on these fields in the Review state and then making these fields "Mandatory" in the Close state.