how to make a catalog task variable mandatory on a specific task on flow designer.

Enovella23
Tera Contributor

ï was asked to modify a catalog task on flow designer. my requestor one some field to be mandatory on a specific task, but not in all how i can achieve this?

1 ACCEPTED SOLUTION

@Enovella23 , if you dont have any filed which stores the uniqueness which says its task a or task b then you can create a custom field and in flow while creating the task set the the field values with different values to recognise the difference between the task a and b 

 

then create a onload client script in sc_task table there get the value of your custom field and set the field mandatory,

 

function onLoad{

var uniqueField = g_form.getValue("custom_field_backeend_name");

 

if( uniqueField == 'Task a' )

{

g_form.setMandatory('state',true);

}

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang

View solution in original post

7 REPLIES 7

do you know which name have the short description task field?

 

@Enovella23 , if you dont have any filed which stores the uniqueness which says its task a or task b then you can create a custom field and in flow while creating the task set the the field values with different values to recognise the difference between the task a and b 

 

then create a onload client script in sc_task table there get the value of your custom field and set the field mandatory,

 

function onLoad{

var uniqueField = g_form.getValue("custom_field_backeend_name");

 

if( uniqueField == 'Task a' )

{

g_form.setMandatory('state',true);

}

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang

Enovella23_0-1711375198408.png

im trying like this but is not working