The CreatorCon Call for Content is officially open! Get started here.

how to create a task on condition

LK11
Mega Expert

I'm a ServiceNow beginner and I'm wondering if someone could help me with this please.

I have to create a task for a particular team if the user chooses 'yes'   for a condition on the form.   Any suggestions would be great.

Thank you

1 ACCEPTED SOLUTION

Arindam Ghosh
Mega Guru

Hello,



If you want this for Service catalog then You need to do this in Workflow. Create a if block with the below condition and create task if condition is yes.



Here is the sample screenshot:


find_real_file.png


Script:


answer = ifScript();



function ifScript() {


if (current.variables.field_name == 'true') { // Update the field name with original field name


return 'yes';


}


return 'no';


}



Thanks,


Arindam


View solution in original post

13 REPLIES 13

along the same lines, when i complete out a change request, it generates two tasks, i want to add 2 more but i can not find where to go for this.


you want to create these two task after completion of change request ? or within workflow. if you want it to create within your workflow then you need to create 2 more task then you need to add 2 more "Create Task" activity in your workflow. either you can drag and drop "Create Task" activity from "core">>"Create Task". or simply copy from existing activity. hope below screenshot will help you.



find_real_file.png


my workflow doesnt have a create task activity.   it must be generated by a business rule which i cant find


how did you create the task? you did not use task activity in your workflow.?


just picked up service now, so new at it.   the form existed and the tasks were there, i am trying to add 2 new ones.   the workflow does not have anything that says create task