The CreatorCon Call for Content is officially open! Get started here.

Make field mandatory before Task can be closed

booher04
Tera Guru

Hello,

I have a variable called "Workflow Progression" that is only on a certain task that fires(UAT Testing Task) from the workflow at a certain point.  The purpose of the field/variable is to ask what the workflow should do next:  Move to Production, Move to RollBack or Close the request(closed skipped).  This variable only appears on the UAT Task.  I need to figure out how to get the field to only be Mandatory when the "Close Task" ui action button is clicked.  We assign this task to different users so we need to open an update it without this field being mandatory all the time.

function onSubmit() {
if(g_form.getValue('state') == '3')
{

g_form.setMandatory('variables.workflow_progression', true);

return false;

}

}

This is what I came up with.  Any help on this?  

15 REPLIES 15

Javier Arroyo
Kilo Guru
Can the check be placed in the 'Close Task' button? If OOB, disable the ui action then, customize a copy of the original.