Q
Problem solve Get help with specific problems with your technologies, process and projects.

Computed subform formula does not work

I have a form for entering inventory. The user wants the form to change for each type of inventory item that they enter. I want to accomplish this by using a single computed subform, which will appear based on the inventory type selected from a combo box. I am using the refresh on keyword change property to rebuild the form. The subform formula is simply the value of the combobox and my subforms are named accordingly. But it's not working, and I can't figure out why. Can you help?

VIEW MEMBER FEEDBACK TO THIS ASK THE EXPERT Q&A.

Computed subform formulas are only evaluated when a form is first opened. Try setting the formula field value, then closing and reopening the document with LotusScript (it may be quick enough to not be noticed). Otherwise, you could try including several sections (or several subforms) on the form with hide formulas that refresh dynamically and determine which information is displayed.

MEMBER FEEDBACK TO THIS ASK THE EXPERT Q&A:

I have used a different method to accomplish this same task.

Put a @PickList statement in a computed-when-composed field to allow the selection of the keyword.

@PickList( [Custom] 
: [Single] ; 
@DbName ; "Subforms" ; 
"Choose the Category for this 
document" ; "Please make your selection from 
the following Categories:" ; 1 ) 

In this example, "Subforms" is the name of a hidden view in the database that contains a list of the desired categories. The subforms are named to correspond to the categories.

Make sure this field appears above the computed subform. The value of the computed subform is then set to the name of the field containing the @PickList formula.

When the document is composed, it brings up the @PickList dialog before displaying the form. The user chooses the category, and then Lotus Notes continues processing the form. When it gets to the computed subform, it evaluates to the category (subform name) that the user picked.

—John C.

Do you have comments on this Ask the Expert Q&A? Let us know.

Dig Deeper on LotusScript

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

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