hcl-bot
December 13, 2007, 9:47am
1
Hi guys,
I have record on a database with several fields. I have wrote an agent (that i manually trigger on selected docs) that will change the field value. I have tied it on the record but is unsuccessful. I have chosen to use Formula language in my agent. Fieldname = raisedBy.
Here is my code:
@If (raisedBy = “Patel Viraj”; “Working”; “Not Working”);
SELECT @All
Any comments?
hcl-bot
December 13, 2007, 9:54am
2
Subject: IF statement
what do you expect to happen?
hcl-bot
December 13, 2007, 9:56am
3
Subject: RE: IF statement
if the original value in the filed is Patel Viraj then it will change to Working. If it is not equal to Patel Viraj then it will chnage to Not Working.
hcl-bot
December 13, 2007, 9:57am
4
Subject: IF statement
You must assign the value to a field:
FIELD FieldName:=@If (raisedBy = “Patel Viraj”; “Working”; “Not Working”);
SELECT @All
hcl-bot
December 13, 2007, 10:16am
5
Subject: ignore… replied at wrong level
hcl-bot
December 13, 2007, 10:02am
6
Subject: RE: IF statement
Hi Rene, thanks for your reply that is working exactly how i expected.
I wanted to say if the value in the field was NOT equal to Patel Viraj then leave how it is?
hcl-bot
December 13, 2007, 10:08am
7
Subject: RE: IF statement
FIELD RaisedBy:= @If (raisedBy = “Patel Viraj”; “Working”; raisedBy );
or
@If (raisedBy = “Patel Viraj”;@setField (“RaisedBy”;“Working”);“”)
hcl-bot
December 13, 2007, 10:17am
8
Subject: RE: IF statement
In that case:
FIELD FieldName:=@If (raisedBy = “Patel Viraj”; “Working”; FieldName);
hcl-bot
December 13, 2007, 10:05am
9
Subject: RE: IF statement
FIELD raisedBy_1:=@If (raisedBy_1 = “Patel Vira”; “Working”; raisedBy_1);
SELECT @All