Catalog Item variable mandatory on only one task

Jason Stephens
Kilo Guru

I need to make a catalog item variable mandatory on only one task. I do not need it to be mandatory when submitted, I just need it to be mandatory on one of the tasks that get generated by the workflow.

Thanks for the help.

Jason

1 ACCEPTED SOLUTION

DrewW
Mega Sage
Mega Sage

have you tried

!g_form.getValue("variables.myvar").isNul()


View solution in original post

24 REPLIES 24

This is how it worked out for me....

I am creating the requests from the service catalog api. Due to this, I can get the work created without the mandatory variable being populated. The task where I need this variable populated is actually the first in my flow, so it worked out. The tech opens the task and is not able to close until the variable is populated. Dumb luck I guess but it worked. I ended up not having to do anything special in my case. Now if the first task was not where I needed the value field, then I would have had to pull some magic.


Well if you figure this out, please let me know. I have already ran into the situation you described where an update needs to be made to the comments before the value of the mandatory field is known. As long as an update is not needed, we're good. But if one is needed, there's not an easy way to add it - even as an admin....

Thanks,

Jason


Can you do an on submit script that checks to see if the task is being closed- and then if so cancel if that field isnt filled out and pop a message. That would make it 'mandatory' without really making it mandatory 🙂


That's an idea. So just a windows style pop-up if the field is not populated? I like it.

Thanks!


One thing that might cause a snag here is I'm trying to do it on a variable, and not a field. I'm not real sure how I would even check a variable on a task to see if it's populated or not...