Using a button to save a document

Hi,

I have the following formula on my form : -

FIELD Check1 := “”;

@SetField(“Check1”; “1”);

@Do(@Command([FileSave]);@SetTargetFrame(“Main Body”);@Command([OpenView];“News View Published”))

How do I include the following formula :-

@If(@IsValid;“”;@Return(“”));

I tried various ways but can’t get it to work. Can anyone point me in the right direction.

Thankyou

Stefan

Subject: RE: Using a button to save a document

FIELD Check1 := “1”;@If(@Command([FileSave]);

@Do(@SetTargetFrame(“Main Body”);@Command([OpenView];“News View Published”));

“”)