- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 12:15 PM
ï 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?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2024 07:43 AM
@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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 12:32 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 12:42 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 01:22 PM
@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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 01:04 PM
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.