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

swathisarang98
Giga Sage
Giga Sage

Hi @Enovella23 ,

 

When you say specific task do you know anything unique about it like if the RITM and task are created by any catalog item or does these task field contain any unique value ?

 

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

Regards,

Swathi Sarang

yes, forexample in a flow a i have diferente catalog task, but i need to make some fields mandatory on task A but no in task B

@Enovella23  you cannot make fields mandatory through flow but you can create ui policy or client script but make sure that to add condition you have a field that flags out the difference between task a and task b

 

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

Regards,

Swathi Sarang

Anubhav24
Mega Sage
Mega Sage

Hi @Enovella23 ,

Can you try writing a catalog client script and make the checkbox applies on catalog task to true and then this target task if it has different description or short description whatever is the unique value get that field's value in your script and then based on that you can make few fields mandatory.

Please mark correct/helpful if my response helped you.