Help with formula validation

Can someone let me know what I need to change to make this work. It is part of the code in an action button. The requestor field is computed to the name of the person creating the document, and the manager field is computed with a default value but changeable via a button on the form. Both fields have the “@Name([CN]; fieldnamehere)” syntax. I need it to stop executing if the names match.

@If(Requestor <> Manager; @Success; @Failure (“Approval of your own requests is not allowed. Please select a valid approver.”))

Subject: Help with formula validation

@Success and @Failure are only valid in Input Validation events. (Not strictly true – @Success is the same as @Yes and @True, but @Failure does not work anywhere else.) The “stop processing” function everywhere else is @Return. In this case:

@If(Requestor = Manager; @Return(@Prompt([OK];“Not Authorised”;“Approval of your own requests is not allowed. Please select a valid Approver.”);“”);

The “” in the @If is a do-nothing. It’s just there so that you can write a “normal” formula for the rest of the action, without having to worry about @Do and so forth.

Subject: Help with formula validation

You need what to stop executing if the names match? What doesn’t work? does the form save when the requestor = manager?

ST