Refresh computed fields on form through view action

I have an action on a view that updates some fields on a form when clicked. Here’s a snippet of the code:

@Do(FIELD EInOut := “Out”;

FIELD EAllDay := “Break”;

FIELD TimeOut := @Time(@Now);

FIELD Out := @If(Out = “0” ; @Text(@Time(@Now));@Text(Out):@Text(@Time(@Now)));

FIELD Comments := @If(Comments = “”; EAllDay; Comments:EAllDay);

@PostedCommand([ViewRefreshFields]));

This code modifies the fields as it should. The problem is that at the bottom of the form I have some computed fields that keep track of total time, work time & break time. In order to refresh these fields, I have to physically open the document and click F9 (sometimes twice).

I’d like to have all the fields refresh with one click. Am I missing the obvious?

Subject: Refresh computed fields on form through view action

Try using this instead of the @PostedCommand([ViewRefreshFields])

@Command([ToolsRefreshSelectedDocs])

Subject: RE: Refresh computed fields on form through view action

OK, I rearranged a couple of fields on the form and now it works fine with @PostedCommand([ToolsRefreshSelectedDocs]).

Thanks for the help.