Try the following:
import System static def GetAttributeValue(User): Value = false if Incident.RaiserUser._IsVip == True: Colour = 'Red' return Value
You need to be very carefull with indenting and in your IF line this must end with ":"
Next Line then must be inented two times.
I used the above, it complaint about missing single quotes around 'true'
Now i am using the below
static def GetAttributeValue(User):
Value = false
if Incident.RaiserUser._IsVip == 'True':
Colour = 'Red'
Got the error message as unknown identifier Incident.
Just to make things clearer here is i am using the above calculation for the "IsVip" attribute created under system>user and calulcation type as "after read"
I want the label to get change on incident window as soon as a vip user raises an incident. We have pre populated the vips with true in end users
Sorry, I didn't read through all your description, I just had a look at the calc and the error message.
As far as I know it is not possible to change a label color based on a selected attribute. At least I can't think of a way to do so.
or if possible , can i not get a dialogue box to appear as soon as this gets ticked or vip user is selected. I did read other posts but was struggling to understand. i will really appreciate if somebody can help in modifying the above code to either get the label colour changed or a dialogue box to appear saying "this is a vip user"