Syntax

stat = REPSORTINS(tag, text, sort_mode)

Arguments

stat: integer

tag: database variable

text: text

sort_mode: see tables below

Meaning

Inserts text into a new occurrence of tag, after which all occurrences of this tag, including the new occurrence, will be sorted. With sort_mode you can indicate how Collections is to sort.

Sort_mode

Meaning

0

text sort

1

numeric sort

2

date sort

By adding a value to the sort_mode code, you can specify in greater detail how you want to sort.

Sort_mode

Meaning

sort + 8

sort in descending rather than ascending order

sort + 256

in text mode: as upper case

sort + 512

in text mode: as lower case

sort + 1024

in text mode: ignore accents

You can combine these extra values. If sort_mode is equal to 1288 (8 + 256 + 1024) that means: sort on text, as capitals, and ignore accents while sorting.

Example

stat = REPSORTINS(au, 'Tuck, F.', 1024)

Result

After inserting a new occurrence with the text 'Tuck, F.', a text sort of all authors, with the accents being ignored, stat is 1 (if the sort has been successful).