Field should be made mandatory if state is in progress and it should not be mandatory if changes i

maharshi_v
Tera Contributor

Hi Team,

 

Please help me to find a solution. There is a field name call mitigated and it should be made mandatory when the state is changed to inprogress. I have written an onload script for this. Now when the assignment group is changed in inprogress state then the mitigated field should not be mandatory and once it is changed it should be mandatory.

3 REPLIES 3

Uncle Rob
Kilo Patron

This sounds like  it would be way easier to do with a UI Policy.
UI Policy:
- Condition:  When State = In Progress
- Reverse if False = True
UI Policy Action:
- Field:  "mitigated"
- Mandatory = True
- Read Only = Leave Alone
- Display = Leave Alone


No scripting needed.  Automatically reverses itself.

Hi Rob,

 

Thank you for your reply. But the problem there is when I tried to change the assignment group it is still mandatory.

AndersBGS
Tera Patron
Tera Patron

Hi @maharshi_v ,

 

I fully agree with @Uncle Rob - a UI Policy would be much easier to work with instead of a on load client script.

 

if my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Best regards

 Anders

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/