I have a submit button on a form that checks some things, updates a field, saves the document and then executes a mail send. I receive the message “Incorrect Data Type For Operator Or @ Function: Text Expected” at the end of all this. The problem is that all the code is executed correctly and the document is closed before the message is sent. How can I tell which field that is causing the problem with the document closed?
@SetField(Issued;@Now)&
@If(DueDate <= @Adjust(Issued;0;0;13;0;0;0);
@Prompt([Ok];“Warning”;“The Due Date must be at least 2 weeks later than the Date Issued. The Due Date you entered has been deleted. Please enter a valid Due Date and click on submit again.”) & @SetField(“DueDate”;“”);
@Command([FileSave])&
@Command([FileCloseWindow])&
@SetField(“Status”;“Open/Submitted”) &
@SetField(“DocAuthor”;“”)&
@MailSend(“John Doe”;“”;“”;“Document has been submitted.”;“A document has been submitted, please review by clicking on the icon below.”;[IncludeDoclink]))