# recno

### recno()

Provides a simple record counter

## Arguments

Argument | Data Type | Description
none | none |

## Returns

A unique record number for each selected record

## Description

The recno() function will provide a unique record number for each of the records selected. This number is determined by the order the records come into Inaport. The first record will always be record 1 and the one hundredth record will always be record 100, whether or not that record has been selected. For example, if there are 10 records in an import, and last five of those records are the records to be numbered using the recno() function then, those records will be numbered 5 to 10. If a change of mind occurs and all even records are to be numbered using recno() then the second, fourth, sixth, and eighth, records will be numbered 2, 4, 6, 8 respectively.

## Examples

Assume that field1 record1 contains aa1
Assume that field1 record2 contains ab2
Assume that field1 record3 contains ac3
Assume that field1 record4 contains ad1
Assume that field1 record5 contains ae2
Assume that field1 record6 contains af3
Assume that field1 record7 contains ag1
Assume that field1 record8 contains ah2
Assume that field1 record9 contains aj3

Assume that the values returned are placed into a newly created field

Example | Returns | Description
contains(#1, "a") recno() | 1 2 3 4 5 6 7 8 9 | If the value in field1 (i.e records 1 to 10) contains the value "a", then perform the recno() function on that field and provide a numerical value.
contains(#1, "1") recno() | 1 4 7 | If the value in field 1 (i.e records 1 to 10) contains the value "1", then perform the recnum function on that field and provide a numerical value determined by the position it finds itself in the input records.
contains(#1, "j") recno() | 9 | only one record in field1 has the value searched for, and so that is the only record that gets a return value from recno(). Since the record is at the ninth position in the input record it get the value "9".

## See Also

counter(), sesstr(), sesnun(), sesbool(), recstr(), recnum(), recbool()