How to prevent duplicate catalog task creation

eliana_wise
Tera Contributor

Hi,

I have a list collector variable which includes 11 options; based on users selection a catalog task will be created for each option. Now I have a form field on the requested item form which has the same options as my catalog variable, and I wrote a business rule to create a catalog task whenever an option is being added to the field. I want to avoid duplicate catalog  task creation meaning when the user created (chose) an option at the item level I want when they choose the same option on the form field to abort the action of creating the same catalog task. Secondly I the form field is a list type field and whenever I add an option to the existing list duplicate catalog tasks are being created for the existing values is there a way to prevent this as well.

Regards.

2 REPLIES 2

sebastian_g_snc
ServiceNow Employee
ServiceNow Employee

Hi,

a question:

there might be a reason for that, but: why do you use a business rule to create the catalog task and not the workflow activity?

To solve your worries about the duplicates: you could have the business rule check for an existing task before you actually create it: If there is already one, just abort the action with 

current.setAbortAction(true);

Does that help?

vinothkumar
Tera Guru
My suggestion is to create a client script and hide a field in RITM form if the variables values is so and so .