Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Assignment rule based on variable with fallback on another assignment rule.

FusiFusionWorld
Giga Contributor

Hi legends,

I have a catch all "assignment rule" "Default Use Regional ServiceDesk" that assigns all user requests directly to their local service desk.

I have a new catalog item with a "multiple choice" variable "please_tell_us_what_you_need" , I want the requests where "question choices" = "I Need The Software Installed On A Machine"  to fall back on the "Default Use Regional ServiceDesk" "assignment rule" and any other choice to be assigned to "I-LON-Apps Support"

I set up a new "assignment rule"  with "applies to" and "assign to" blank and the following script, This works for the options mentioned in the script but Tasks spawned where the "question choices" = "I Need The Software Installed On A Machine" do not fallback to the other assignment rule and therefore are not assigned to any group.

 

Also please could anybody advise on how to add further variable responses? I tried to copy another instance of the "else" part of the script but just got an error. 

 

I know one of you genius' will know how to resolve this for me!

 

Thank you,

Ben,

2 REPLIES 2

FusiFusionWorld
Giga Contributor
if(current.request_item.variable_pool.please_tell_us_what_you_need == 'New Account') {


current.assignment_group.setDisplayValue("I-LON-Apps Support");


}


else {


if(current.request_item.variable_pool.please_tell_us_what_you_need == 'Account Change') {


current.assignment_group.setDisplayValue("I-LON-Apps Support");


}


}

FusiFusionWorld
Giga Contributor

Hey, I've never not had a reply on a question here, is there something wrong with the wording on this question?