Sequence property

The Sequence property is a read-only property that is automatically generated. It starts with 99 and counts back in case of multiple custom indexes. If you remove a custom index, the others are not renumbered. During addition of a new custom index first the open number is reused.

In the hooks or other script components where to use the custom index, you can refer to it with this property:

<package><module><table number>._index<sequence>.

We recommend that you use the individual fields in the queries. In case the standard table definition is modified and the custom index is also available as standard index, you can delete the custom index. Changing the scripts and hooks where you use the index is not required.

Example:

This example shows a validation check to prevent not unique values in a customer defined field.

function extern boolean tccom100.cdf_lnam.is.valid(long mode)
{
        domain  tccom.bpid bpid
        
        select  tccom100.bpid:bpid
        from    tccom100
        where   tccom100._index99 = {:tccom100.cdf_lnam}
        and     tccom100.bpid <> :tccom100.bpid
        as set with 1 rows
        selectdo
                dal.set.error.message(sprintf$("@Name used for BP %s", bpid))
                return(false)
        endselect
        
	return(true)
}