Hello All,
I am creating a form that contains a number of subforms (chosen by formula) each in their own section.
I have a radio button called Choice and when the form loads this is all the user is presented with. It has no default value
The sections are hidden until an option is chosen in the radio button (Choice Field). Once the option is chosen then the section appears.
The section appears but the Computed Subform does not show.
My formula for the computed Subform (Default Value) is
@If(Choice=”Audit Engagement Acceptance Form”;”AEAF”;””)
I presume this is computed initially when the form is loaded and because my Choice field is not set then the subform will not load. Is there a way to load the subform after a user has chosen an option in the Choice field
Want to avoid putting the actual subform into the section and rather it was computed.
Thanks in advance,
Laura
Subject: Forms and Subforms
You can also use a script
Dim ws as new NotesUIwokspace
Dim uidoc as NotesUIdocument
dim doc as NotesDocument
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
call uidoc.save()
call uidoc.close()
call ws.EditDocument(true, doc)
Subject: Forms and Subforms
"I presume this is computed initially when the form is loaded"Correct; think of a computed subform as a “Computed when opened” field. Please note that no tricks you pull, including the “Automatically refresh fields” suggestion made elsewhere in this thread, can change this fact and make your radio button work.
“Is there a way to load the subform after a user has chosen an option in the Choice field”
Not using an editable radio button, but you have other options. One simple method would be to make your Choice field CWC, with a formula which presents a choice in an @prompt([okcancellist]). (You can still make it a radio button field if you like; just make it CWC, not Editable.) As long as the Choice field is located before the computed subform in the top-down field evaluation order, this will work because the initialization of the form will be pause while the @prompt is hanging.
Subject: Forms and Subforms
Use this:
@command([viewswitchform]; form)
(it’s a way to reload the complete form used in the document)
This does not work if the document is new (has not beeen saved).
Then, use this:
@if( !@isvalid; @return(“”); “”);
@command([filesave]);
@command([viewswitchform]; form)
or
@if( @isnewdoc; @return( @prompt([OK]; “”; “Save it previously”)); “”);
@command([viewswitchform]; form)
Subject: Forms Property: Automatically Refresh Fields
Laura,
Enable the Forms property Automatically Refresh Fields and it should do what you want.
HTH,
Bob