Multiple dates in catalog item

davidsmith
Tera Expert

Hello,

 

We have a catalog item where users can book multiple dates when they want help in a teaching room. At present when the user submits the request all of the information gets put into one catalog task. What we like to do is for each date to be a separate task. This means that a separate help desk agent can be assigned to each date. Is there a way to do this in Workflow or would Flow Designer be better suited?

Thanks in advance

David

1 ACCEPTED SOLUTION

Adrian Ubeda
Mega Sage
Mega Sage

Hi @davidsmith

You can achieve this from several different ways but you'll need to script, i let some approach using flow and workflow:

1) Using flow, i'll retrieve the variables needed with the 'get catalog variables' action and then I will create a custom scripted action for creating the sc_task using the retrieved cat variables as input for that action. You'll need to pass each variable as input so it won't dinamyc.

2) Using workflow, you can create a custom step and then insert record for each date into sc_task table. I'll retrieve all catalog variables and then create an array for looping over it and create each task as deserve.

 

In both cases, you'll need to retrieve the variables and create and array or structure for looping over it.

If it was helpful, please give positive feedback! ✔
☆ Community Rising Star 22, 23 & 24 ☆

View solution in original post

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@davidsmith 

you can create multiple tasks both via workflow and flow designer

what's the current approach workflow or flow?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Adrian Ubeda
Mega Sage
Mega Sage

Hi @davidsmith

You can achieve this from several different ways but you'll need to script, i let some approach using flow and workflow:

1) Using flow, i'll retrieve the variables needed with the 'get catalog variables' action and then I will create a custom scripted action for creating the sc_task using the retrieved cat variables as input for that action. You'll need to pass each variable as input so it won't dinamyc.

2) Using workflow, you can create a custom step and then insert record for each date into sc_task table. I'll retrieve all catalog variables and then create an array for looping over it and create each task as deserve.

 

In both cases, you'll need to retrieve the variables and create and array or structure for looping over it.

If it was helpful, please give positive feedback! ✔
☆ Community Rising Star 22, 23 & 24 ☆

davidsmith
Tera Expert

Hello,

 

That is most helpful. I will take a look at both methods.

Kind regards

David