To make variables mandatory when the 'closed complete' or 'closed incomplte' are clicked on a catalog task

rog
Giga Contributor

HI all,

I have a requirement where I have to make certain fields mandatory when clicked on closed complete or closed incomplete buttons on a catalog task.

I have written the following client script on the variable set:

Tyoe : onSubmit

function onSubmit() {

if(g_form.getValue('state') == '3')

{

          g_form.setMandatory("variables.var1", true);

g_form.setMandatory("variables.var2", true);

  }

}

But it is not working. please help.

Thanks

11 REPLIES 11

rog
Giga Contributor

Hi Shloke,



Thanks for the response, but the catch here is that the variables here are task specific and will be visible only on specific task.



Thanks.


Hi,



Do you have anything unique between those Tasks which differentiates between them? Or you want this validation for specific catalog items which has these variables on their Task from? Please clarify



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke