seq(
seq(
)

The seq( function returns sequential numbers (1, 2, 3, etc.).

Parameters

No parameters.

Description

The seq() function returns sequential numbers (1, 2, 3, etc.). This function works in conjunction with repetitive operations like formulafill, arrayfilter(, characterfilter( etc.

When it is used with the formulafill, find or select statements, the seq( function returns a sequential number for each applicable record (the first selected record is 1, the second is 2, etc.). A record is applicable if the formula is applied to it, for example, selected records for formulafill, or selectwithin, and all records for select.

When it is used with filter operations (arrayfilter, characterfilter, etc.), the seq( function returns a sequential number for each element in the array being processed (the first array element is 1, the second is 2, the third is 3, etc.).

When it is used at any other time, the seq( function returns the number 1.

This procedure selects the first 10 records in the database:

    select seq()<=10

The procedure below will select every 5th record in the database.

    select (seq() mod 5)=0

By changing the 0 in this formula to 1, 2, 3, or 4 you can select different sets of data, but still 20% of the database each time.

See Also

- arrayfilter( -- processes each element of a text array or a data array with a formula (see Text Arrays and Data Arrays).
- csvtotsv( -- converts comma separated text into tab separated text.
- Import Database -- importing another database into the current database.
- import( -- returns a line or element of imported data. This function works in conjunction with repetitive operations like importtext, arrayfilter(, characterfilter( etc.
- importcell( -- returns one cell of imported data.
- importdatabase -- imports data from another database into the current database.
- importjson -- imports a JSON array into the current database.
- importjsonline -- imports a JSON record into the current record.
- importline -- imports a line of text into the current record.
- importrawdata -- imports raw binary data into an existing database.
- importtext -- imports text into an existing database.
- newdatabasewithtextfieldnames -- creates a new database from a text file. The text file must contain the field names in the first line.
- newdatabasewithtextfile -- creates a new database from a plain text file. The fields will be named A, B, C, etc.
- partialdatabaseupdate -- updates one or more components of an existing database.
- Text Import -- importing text into an existing database.
- tsvtocsv( -- converts tab separated text into comma separated text.
- tsvtojson( -- converts tab separated text into JSON formatted text.

History

Version | Status | Notes
10.0 | No Change | Carried over from Panorama 6.0