Link/Tree Methods and Properties (inherits Item)

void setUserFilter ( number rowNum, string filter )

Set filter on link query

Set a filter expression to be used when the link or tree is next reloaded (see the reload method below). This should be a valid SQL order by expression, and will be used in the query in addition to (and after) any other filtering expressions. Note that when used, this method must be called whenever the record display is scrolled, and would typically be invoked with a block onDisplay event.

void setUserSorting ( number rowNum, string sorting )

Set sorting on link query

Set an ordering expression to be used when the link or tree is next reloaded (see the reload method below). This should be a valid SQL order by expression, and will be used in the query in addition to (and after) any other ordering expressions. Note that when used, this method must be called whenever the record display is scrolled, and would typically be invoked with a block onDisplay event.

void reload ( number rowNum )

Reload link query

This method reloads the link or tree, using the query specified at design time, plus a user filter or sorting expression is set (see setUserFilter and setUserSorting). Note that when used, this method must be called whenever the record display is scrolled, and would typically be invoked with a block onDisplay event.

string getExtra ( number rowNum, number extra )

Get extra value

Returns an extra value for the control for the specified row. Extra values are specified in the control setup, and name additional columns (or, generally, SQL expressions) that are retrieved from the linked table (or query). If the specified row is not visible, returns an empty value.

string getRowExtra ( number rowNum, number extra )

Get extra value from underlying query

Similar to getExtra, but the value is retrieved from the underlying query. Any row can be accessed (not only those for visible rows). The value may not correspond to the currently displayed value if the user has changed the control but not saved the record.

string getDisplay ( number rowNum, number index )

Get display value

Returns the display value, rather than the actual data value. Where values from multiple columns are displayed, the index argument specifies which (so would be zero in the usual case where only a single column is displayed).

string getRowDisplay ( number rowNum, number index )

Get display value from underlying query

Similar to getDisplay, but the value is retrieved from the underlying query. Any row can be accessed (not only those for visible rows). The value may not correspond to the currently displayed value if the user has changed the control but not saved the record.

number getNumValues ( number rowNum )

Get number of values displayed

This method returns the number of values displayed in the link or tree control, but not counting the null value. It is equal to the number of records retrieved by the SQL query used to populate the link or tree control (and is one less that the number of entries in the dropdown if the null value is displayed).

list getDisplayList ( number rowNum )

Get list of values displayed

A list of displayed values is returned, ie., the set of values retrieved from the database to populate the link or tree control. Note that where multiple values are displayed (eg., the link control has more than one column), only the first value from each is returned.