Help needed with a @If Statement

Hello Everyone,

I have this code below in an approver button. The code works fine when I didn’t have the !@Contains section in both statements. I need to check if the person has already approved this invoice, and if they have display some text saying they cannot approve more than one stage. I’ve tested the code, and I’m able to approve at two stages, so somehow my @Contains command is not working within the @If statement.

Any thoughts?

Appreciate any help,

Thanks,

Hayley.

@If(Status=“Draft” & !@Contains(LogDisplay;“CRW-Notes Development”);@Do(

FIELD OldTotals:=LatestTotals;

FIELD ProcApproved:=“Yes”;

FIELD SentForApp:=“No”;

FIELD Status:=“Approved”;@MailSend(Approver3;Approver1:Approver2:Approver5;“”;“Bid Ref# “+BidNo+” - Final Approval Required”;“”;“This invoice has been approved.”+@NewLine +@NewLine + “Please follow link to give your Final Approval” +@NewLine +@NewLine + “Thank you.”;[IncludeDoclink]);@PostedCommand([FileSave]) ;@PostedCommand([FileCloseWindow]));

Status=“Approved” & !@Contains(LogDisplay;“CRW-Notes Development”) & Change = “Yes”; @Do(

@Prompt([Ok]; “Please Confirm Change”; “Please press the Notify Change Button to confirm your change”); @Return(“”));

@Do(

FIELD ProcApproved:=“No”;

FIELD SentForApp:=“No”;

FIELD FinalApproved:=“Yes”;

FIELD Status:=“Final-Pending Accounts”;

FIELD Name:=@Name([CN];@UserName);

@Command([ViewRefreshFields]);

@Command([FileSave]);

@MailSend(Approver4;Approver3:Approver1:Approver2:Approver5;“”;“Bid Ref# “+BidNo+” - Final Approval Given”;“”;“I Confirm Final Approval has been given on this invoice.”+@NewLine +@NewLine + “Please follow link to complete” +@NewLine +@NewLine + “Thank you.”;[IncludeDoclink])|@PostedCommand([FileSave]) & @PostedCommand([FileCloseWindow]);“You have already approved this invoice at another stage, you can only approve one stage. Thank You.”));

FIELD Log:= Log+@NewLine+Status+ " by “+Name+” on " +ModifyDate;

Subject: Help needed with a @If Statement

Try @IsNotMember instead of !@Contains.