Computed Subforms and environment variables

On my form there is a computed subform with the following formula:@If(@Environment(“Language”) = “E” ; “SbFrmRequest_E” ; “SbFrmRequest_S”)

This should work fine when the "english button in the action bar is clicked on, but nothing happens to the displayed subform. Here is the code for the “English” switching button:

@If(@IsDocBeingEdited;

@Do(@SetEnvironment("Language"; "E"); @Command([ViewRefreshFields]));

@Do(@SetEnvironment("eLanguage"; "E"); @Command([FileCloseWindow]);

@PostedCommand([EditDocument]; "0")))

Can someone tell me if there is an issue regarding LN v 6.5.5 or is it a Windows XP issue?

Much appreciated,

Dan

Subject: Computed Subforms and environment variables

Are you expecting the subform to change in a open document as soon as the user clicks the button?That won’t work. From the Designer Help: “Subform formulas cannot be refreshed while the document is open.”

If you want to make the subform appear to change on the screen when the user clicks the button, you’ll have to run code to close and immediately re-open the document.