How to set assignment group

Mi4
Tera Expert

Hi,

I want to set an assignment group by a variables in the record producer.

This option will increase in the future.

Can these be achieved with assignment rule lookup?

Or do you create a custom table and make a mapping table to handle it?

Can it be done only with business rule?

I'm looking for a way that is as standard as possible and easy to manage without scripts.

Regards,

1 ACCEPTED SOLUTION

Mohammad Danis1
Giga Guru

Hi,

I am assuming you have Category and SubCategory Field avaiable on the target table ?

If yes, then I would suggest you to go with Assignment Rule rather than the Assignment look up Rule :

You can create An Assignment Rule :

find_real_file.png

And to populate Assignment group you can script under script part something like :

if (current.category == "Hardware" && current.sub_category== "Hardware")
    current.assignment_group.setDisplayValue("ABC"); 
 else if (current.category == "Software")
  current.assignment_group.setDisplayValue("XYZ");
else if (current.category == "Malware")
current.assignment_group.setDisplayValue("Security");

find_real_file.png

 

Let me know, if that answers your question and mark my answer as correct / helpful.

 

Kind Regards,
Mohammad Danish

View solution in original post

24 REPLIES 24

Hi,

Thank you for your information.

I'm sorry I couldn't communicate well.

I am worried about the management method due to the ever-increasing number of categories and subcategories. Thanks to you guys, I've found that it's a way to do business rules, record producer scripts, allocation rules, etc.

So you taught me how to write in a record producer's script, but I wanted to know why you taught me how to do it.

The benefits realized by the script of the record producer.

I think it's easy.

 

Regards,

Do you mean by the benefit of using a record producer? 

If yes, then here you go.

Record Producer. A record producer is a specific type of catalog item that allows end-users to create task-based records, such as incident records, from the service catalog. Use record producers to provide a better end-user experience instead of using the regular task-based form for creating records.

Thanks

Shantharao
Kilo Sage

Hi If you dont want use scripts below suggestion is the best

This can be achieved with assignment lookup rules is best way to handle

you can configure the assignment rules in the lookup tables can handle the large no.of entris 

 

Mark Correct if my response solves your issue and also mark 👍 Helpful if you find my answer helps you based on the impact.

Hi,

Thank you for your information.

What are the disadvantages of this feature?

Do you like using this feature or writing scripts such as script includes to respond?

Regards,

Gaurav Shirsat
Mega Sage

Hi Mi

In the workflow, while creating Catalog task, in the script section of catalog task, write

 task.assignment_group = current.variables.assignment_group;

OR

Option 1: Make sure your variable name in Record producer is equal to column name of assignment group of the target table.

Or

Option 2: Use the map to a field in the Record producer variable.

find_real_file.png

For ex: Create a variable on the record producer with the same name as the field in the target record. For example, a variable named caller_id on a Create a New Incident record producer populates the caller_id field on the new incident record

https://docs.servicenow.com/bundle/london-it-service-management/page/product/service-catalog-managem...

 

 

Please Mark Correct and Helpful

Thanks and Regards

Gaurav Shirsat