Making variables mandatory on RITM when a certain task is created

turnea
Mega Expert

Hi everyone,

I have a fairly complex process for building servers where the engineer actually fills in variables from the RITM level.   The requirement is for certain fields that are not visible during the client filling out the form to be mandatory when the IT engineer receives their task.   There is an approval that needs to be done prior to the IT Engineer receiving the task to make the changes, so I can't simply use a UI policy from the beginning.   Has anyone ever done some form of script that will make variables mandatory on the RITM level *only* when a specific task is created?   I'm pretty stuck here right now.

1 ACCEPTED SOLUTION

Mike Allen
Mega Sage

You should be able to do a catalog client script of a catalog ui policy that does this, you just need to define your trigger.   You can make mandatory once the request is approved:


onLoad


var approval = g_form.getReference('request').approval;


if(approval == 'Approved'){


g_form.setMandatory('field', true);


}else{


g_form.setReadOnly('field', true);


}


View solution in original post

5 REPLIES 5

Hi Mike,



That's exactly what it was, I just changed the capitalization and it worked!   You're a star, thanks so much!