Manage Learn to apply best practices and optimize your operations.

Refresh computed subform

How to calculate for a computed subform after the form is open.

View member feedback to this tip.

If you want to load a computed subform based on a user selection (from dialog box, check box...). The calculation for a computed subform is done at Form Open, so once the form is open you can't change the subform on fly.

Don't worry --here is the order of tasks and code for the process.



  1. Create a Form (Make it default notes form)
  2. Create a dialog box field "Action."
  3. We want to open subform based on the selection.
  4. Put the following code into onExit event of field Action.
Dim workspace As New NotesUIWorkspace
 Dim uidoc As NotesUIDocument
 Dim new_uidoc As NotesUIDocument
 Dim doc As NotesDocument
 
 Set uidoc = workspace.CurrentDocument
 Set doc = uidoc.Document
 Call doc.computewithform(True, False)
 Call Workspace.SetTargetFrame("")
 Set new_uidoc= Workspace.editdocument
(True, doc)
 uidoc.document.saveoptions = "0"
 Call uidoc.close
'refresh the document
 Call new_uidoc.reload
 Call new_uidoc.refresh

MEMBER FEEDBACK TO THIS TIP

This is a good tip. You can avoid using a default form (in some case you can have several forms involved, or the default form is already used).You just add assigning a value to the form item before the computeWithForm:

doc.form = "MyFormName" 
doc.computeWithForm true, false 

—Thierry S.

Do you have comments on this tip? Let us know.


Dig Deeper on LotusScript

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com'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 ...

SearchDataCenter

SearchContentManagement

Close