IF statement

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?

Subject: IF statement

what do you expect to happen?

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.

Subject: IF statement

You must assign the value to a field:

FIELD FieldName:=@If (raisedBy = “Patel Viraj”; “Working”; “Not Working”);

SELECT @All

Subject: ignore… replied at wrong level

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?

Subject: RE: IF statement

FIELD RaisedBy:= @If (raisedBy = “Patel Viraj”; “Working”; raisedBy );

or

@If(raisedBy = “Patel Viraj”;@setField(“RaisedBy”;“Working”);“”)

Subject: RE: IF statement

In that case:

FIELD FieldName:=@If (raisedBy = “Patel Viraj”; “Working”; FieldName);

Subject: RE: IF statement

FIELD raisedBy_1:=@If (raisedBy_1 = “Patel Vira”; “Working”; raisedBy_1);

SELECT @All