Manage Learn to apply best practices and optimize your operations.

Dynamic Subforms (Almost)

I have several times had the need to incorporate different computed subforms based on what kind of input the user supplies. In order to accomplish this I have used an "initial" entry form, collecting the necessary data to determine what subforms to use. This initial form has SaveOption set to "0" and in a button I construct the "real" form to be used. The fields that determine what subform to be used are filled and the new form is then presented to the user.

Things to take into account:
- The new document is never "New"; it's created in the background
- If the new form has computed fields they are not computed automatically; they have to be calculated.

'Collect data from "initial" forms uidoc
'Create new document
Set doc = db.CreateDocument
doc.form = "newform"
'Collect info from "initial" form
Call inherit_values(uidoc,doc,"fields_to_inherit")

'Determine subform to use
documenttype =..... something
doc.subform = DetermineSubform(documenttype)
'Show new form with correct subform to user
Call uidoc.close
Set uidoc = ws.Editdocument(True,doc,False)

Dig Deeper on Domino Resources - Part 4

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...