I have a multi-lingual form in which there are several subforms. If the end user clicks on a button to change the language to french then the computed subform should display a different subform name such as “subfrom_F”.
My computed subform formula is as follows:
@If(@Environment(“Language”) = “E” ; “SubFormInfo_E” ; “SubFormInfo_F”)
When the user clicks on the “Switch to French” button nothing happens. Her is the code behind the button:
@Do(@SetEnvironment(“Language”; “F”); @Command([ViewRefreshFields]))
Can someone help me with this?
Thanks,
Dan
Subject: Changing subform name based on condition
Don’t know whether this is what you want:
Create a field, say “LanguageType”, and it is Computed; Dialog List;
Put formula as: @If(LanguageType=“”;“”;LanguageType)
Then insert Computed Subform, put formula as: LanguageType.
So everytime when end users choose the different Language, the corresponding subform will be displayed.
Subject: Changing subform name based on condition
The Subform is only computed when the form is opened. So what you need to do is close the UIDoc and then re-open it. In most cases the worst the user will see is a scree flicker as this happened. Search this forum I know that I answered this question at least a couple times.
Subject: Changing subform name based on condition
Dan,
Sub forms are loaded when the form is opened, you would have to close and re-open the document. Or you could load both sub-forms, and hide the values on your enviroment variables.
John