I have a form with a radio button on the top part of it. This radio button has 2 choices: Activity and Leave. If I click Activity, the subform for it should be displayed and vice versa. Please help me on how to go about it. Thanks.
Subforms are form elements that can be included conditionally, but only when the document opens. There is no subform reload ability in Notes (although I have to check that particular issue in R6).
What you are looking for is not subform functionality, but Hide/When functionality.
I would therefor suggest that you keep your subforms, and add a Hide/When formula to all data in each subform, tying it into the value of the radio button.
That would allow you to display different parts following the user's choice, at the price of paying a bit of attention to whatever additions you might need to do to the Hide/When formulas for other reasons.
That would also avoid the much more cumbersome (and hardly user-friendly) alternative of saving the document with only that choice, closing it and reopening it.
On the other hand, if the choice is something you do at the start of the document's creation, you might want to think of using two buttons for creating the document instead of one.
Indeed, it would seem that, for the moment, you have one button to create the document, which then forces the user to choose what kind of document to create.
It might be better to give the user the choice from the menu by creating a list with Activity Document and Leave Document as items. By clicking on one or the other, the proper document type is then created by using code that is much easier to implement.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.