Add document button code

I have a form with an ADD document button that at the moment does this: @Command([FileSave]);

@SetTargetFrame(“ContentFrame”);

@Command([OpenView]; “MyItems”)

However, I need to test to see if the user has completed four fields (name, desc, full, phone) before allowing them to save the document and execute the code above. If any of these fields are empty they should get a mesage to complete all fields and not be able to save until they do unless they select the CANCEL button.

I have asked this one before but I don’t think my question was clear enough. I have tried a number of ways to do this but seem unable to get a correct solution.

thanks for any help

Martin

Subject: Add document button code

How about@If(FIELD1 = “” | FIELD2 = “” | FIELD3 =“”; @Return(@Prompt([OK]; “Error”; “You need to fill in all fields”)); “”);

@Command([FileSave]);

@SetTargetFrame(“ContentFrame”);

@Command([OpenView]; “MyItems”)

Subject: RE: Add document button code

Roger

Thanks very much - just could not get mine to work but that one works fine

Martin