Action Button - Invalid Formula Format

I have created a form that will allow users to submit a request for Hardware or Software. Once the form is completed, the user clicks a button that sends an email with a doclink to the Department Head for approval. This button works just fine.

When the Department Head opens the email, clicks on the doclink and is taken to the request form, they have an action button to Approve and forward to the IT department for their action. When the Department Head clicks the button they get a popup box that reads “Invalid Formula Format”. DH clicks OK. The same box presents again. The DH again clicks OK. They are then presented with a popup box that reads “Document has not yet been saved”. The DH clicks OK and is presented with another popup box that reads “Do you want to save your changes? Yes, No, Cancel”. Yes does nothing. No does nothing.

Here is my action button Code:

@Command([EditDocument]);

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

FIELD NewApproved := “1”;

@Command([FileSave]);

@Command([ToolsRunMacro]; “Approve and Route to HIT Agent”);

@Command([FileCloseWindow])

The agent is a Simple Action - Send Mail.

I have deleted and readded the NewApprover and NewApproved Fields.

I have run Fixup, Compact and Updall on the database.

I have deleted and recreated the action buttons.

I have deleted and recreated the agents.

I really do not know what else to try.

Any advice would be greatly appreciated. Thanks!!!

Subject: Action Button - Invalid Formula Format

Please DISREGARD – I have found a workaround

Subject: RE: Action Button - Invalid Formula Format

To quickly solve problems yourself, you might start out by searching for your error message here and elsewhere – for instance: http://www-10.lotus.com/ldd/46dom.nsf/Search?SearchView&Query=invalid%20formula%20format&SearchOrder=0&Start=1&Count=100http://www-1.ibm.com/support/docview.wss?uid=swg21091660

The initial problem is not with your action button. There’s something on your form that generates this error when you try to save. Various possible explanations, but perhaps there’s some odd hide formula on your rich text?

There are some other problems with your action button. Because you fail to check the return value of the FileSave command, you go ahead and run the agent anyway on the unsaved document, which fails because it hasn’t been saved. Then, again without testing for success of the previous step, you try to close the document, which causes a prompt whether you want to save, since you didn’t do that yet.