08-07-2012 02:16 PM
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")
Thanks for the help!
08-07-2012 02:23 PM - edited 08-07-2012 02:28 PM
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")
08-08-2012 09:17 AM
That worked great!, but i'm still having 2 issues. It defaults to Category = incidents when i goto Search for a a Ticket or if i Click the "Change Category" Button when viewing a ticket.
Anyway around this as well ?
08-08-2012 02:24 PM - edited 08-08-2012 02:24 PM
The problem is that you apparently added the new expression to Master Format control (name="incidents").
Instead, move the expression to the format control "SD.open.interaction". It will then be executed only when the user is opening a new ticket, and not when the search form is displayed.
If you also need the expression executed on update (e.g. when the service desk reviews Self Service tickets), add the expression to the format control "SD.update.interaction".
If you have changed the name of the Interaction open and update formats as part of your tailoring, update the corresponding format control records instead of those above (which show the out-of-box form names).
08-09-2012 08:02 AM
I added it to the SD.open & IM.update Format Controls only.
When I click the Category I can pick Red / Blue ect...
but when i click subcategory it bring sup the list of Categories under RED everytime. Even if i type in Blue. and once I pick my cateogries and go back to the form Category has been changed to RED.
I've looked for any kind of format control that might cause this to happen on IM.update, but didn't see anything that reference category.
Now when i put it in SD.open.interaction it worked great. When the correct person logged in it defaulted straight to RED or BLUE.
08-21-2012 06:16 AM
You have to use apm.quick FC not the IM.update if you want to assign default value at time of open only.
Also it should not be the case that even if you have BLUE then it still show subcategory if RED only.
Subcategory are controlled from the table "subcategory" so check the same for the BLUE category.
If you want to restrict particular category for a user role the you can use the concern IM profile from operator record , here in forms tab just mention the name of categories you want to allow to particular user.