INDEX
For each parent record, returns a number for each child record that indicates its index. If a field (rather than a table) is supplied then the records will be sorted using this field before the index value is calculated.
INDEX ( <table_name or field_name>, <link_table> [, <filter_query>] )
-
table_name or field_name: The name of the table at the many end of the link, or a field on this table. If a field is supplied then child records will be sorted using this field.
-
link_table: The name of the parent table.
-
filter_query: A query string representing the domain of records to include.
Example: create a field on the PRODUCT table that gives the index of each record based on the value for products that were purchased in 1994.
INDEX( [PRODUCT.PRODUCT_VALUE], CUSTOMER,[PRODUCT.PURCHASE YEAR] = "1994" )