I have a computed textfield “Status” with the value: @If(ind=“”;“1. Being Composed”;Status).
Lateron when the field Status gets the value: “4. In process by section involved”, following formula is executed in the QUERYSAVE event:
FIELD Oknotok := Oknotok;
FIELD Status := Status;
MailText := “blabla” + SeqNr_D + " blabla" + @Text(Date;“S0”) + " . " + @NewLine + "blabla " + @NewLine + @NewLine + "Click here for a link to the subject document ==> ";
MailText1:= “blabla” + SeqNr_D + " blabla" + @Text(Date;“S0”) + " . " + @NewLine + "blabla. " + @NewLine + “blabla.” + @NewLine + @NewLine + "blabla ";
@If(Status = “4. In process by section involved”;@If(Oknotok = “DONE”;@MailSend(issuer;“”;“”;“Request for Operations Assistance nbr” + SeqNr_D;MailText;“”;[IncludeDoclink])&@SetField(“Status”;“6. Completed and to be approved”);@If(Oknotok = “NOT POSSIBLE”;@MailSend(issuer;“”;“”;“Request for Operations Assistance nbr” + SeqNr_D;MailText1;“”;[IncludeDoclink])&@SetField(“Status”;“5. Not possible”);“”));“”)
Since this formula was entered in the querysave event I get the errormessage: “Incorrect data type for operator or @function: Number expected”, although the formula is completely and correctly executed.
When I leave out:
@SetField(“Status”;“6. Completed and to be approved”);
and
@SetField(“Status”;“5. Not possible”);
… the message disappears.
What’s wrong with the Status field?