Format Control to Default Category to certain option based off of User Role

by Community Manager on ‎08-21-2012 08:20 AM

Question

Basically when someone clicks to open the New Interaction page (SD.open.interaction).  If they are in the User Role Blue or Red I want Category to default to Red_Blue, otherwise I want Category to default to Black.  

 

Can you see anything thing with my format control for SD.open.interaction ? 

 

if ($G.auth.assignment in $file="Blue" or $G.auth.assignment in $file="RED") then ($category="Red_Blue") else ($category="Black")

Answer

Well, right off the bat, $G.auth.assignment doesn't have anything to do with their assigned user role. And when referencing a global variable, you should not include "in $file" as it is not stored in the current file. And if you want to set the category in the current record, it should reference $file.

 

$G.user.role holds the user role of the current operator.

 

This expression will evaluate the operator's user role and set the category in the ticket:

if ($G.user.role="Blue" or $G.user.role="RED") then (category in $file="Red_Blue") else (category in $file="Black")

Comments
by Honored Contributor on ‎10-01-2013 05:39 PM

While the SD profile does not include a "Default Category" setting, it does include a Default Template.

 

To default the category for your Blue users, create a template with only category="blue" and assign that template as the default template in the SD profile for blue users. 

 

To default the category for your Redusers, create a template with only category="red" and assign that template as the default template in the SD profile for red users. 

 

At the Incident level, this is even easier, as the Incident profile includes a field to specify the Default Category to use when a user with that profile opens a new incident. 

Search
Showing results for 
Search instead for 
Do you mean 
HP Blog

IT Service Management Blog

Featured


Follow Us
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.