KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: How to procedurally expand a Hierarchy List
PRODUCT: 4D | VERSION: | PLATFORM: Mac & Win
Published On: June 13, 2002

Compatibility: 4D 6.5, 6.7, 6.8


There are times when you may want to procedurally expand a Hierarchical List. To accomplish this, all that is required is the List ID and the reference ID of the Item to expand.

The command to use is:

SELECT LIST ITEM BY REFERENCE (list; itemRef)


Parameter Type Description
list ListRef List reference number
itemRef Number Item reference number

Here is an example:

SELECT LIST ITEM BY REFERENCE(MyList;Child_Item_ref_2) `expand item 2
`you can expand more items by passing another command
SELECT LIST ITEM BY REFERENCE(MyList;Child_Item_ref_3)
`You must call "redraw list" to show the appropriate changes
REDRAW LIST(MyList)