<OBJECT>.INDEX_SET()

Syntax

Result_Flag as L = <OBJECT>.INDEX_SET( [ Index_Name as C ] )

Argument

Description

Result_Flag

 

Index_Name

The name of an index or query list. A NULL ("") string the form's sort order to record number order.

Description

The <OBJECT>.INDEX_SET() method applies to:

The <OBJECT>.INDEX_SET() method selects an index or query list as the primary index. This method is a wrapper for <TBL>.INDEX_PRIMARY_PUT().

Supported By

Alpha Five Version 5 and Above

Limitations

Desktop applications only.

Example

This script is attached to a button on a form. It sets the form’s sort order to record number order:

parentform.index_set("")

This script is attached to a button on a form. It displays a dialog with a list of indexes and queries, and allows the user to select an index/query.

dim list[count] as C

t = table.current()

'count the number of indexes/queries

count = 1

while (t.index_name_get(count) != "")

    count = count + 1

end while

count = count - 1

'create an array with the index names

for I = 1 to count

    list[I] = t.index_name_get(I)

next i

index_name = ui_get_list_array("Choose an index", 1, "list")

parentform.index_set(index_name)

For more examples, see the <FORM>.FIND() method.

See Also

Form Functions and Methods, Browse Functions and Methods