fno()

Read(2146) Label: fno,

Here’s how to use fno() function.

T.fno(F )

Description:

Get the ordinal number of a field in a table sequence.

Syntax:

T.fno(F)

Note:

The function gets the ordinal number of field F in table sequence T. If there is no parameter, the number of fields in T will be returned; if the specified field cannot be found, a null value will be returned.

Parameter:

T

Table sequence

F

Field name

Return value:

Integer/Null

Example:

 

A

 

1

=demo.query("select * from EMPLOYEE")

 

2

=A1.fno(EID)

1, which indicates that the ordinal number of field "EID" is 1.

3

=A1.fno()

9, which indicates that there are 9 fields in the table sequence.

Related functions:

r.fno()

r.fno(F )

Description:

Get the ordinal number of a field of a record in a table sequence.

Syntax:

r.fno(F)

Note:

The function gets the ordinal number of field F of record r in the table sequence; if there is no parameter, return the number of fields in the table sequence in which r locates. If the field cannot be found, a null value will be returned.

Parameter:

r

A record

F

Field name

Return value:

The ordinal number of a field

Example:

 

A

 

1

=demo.query("select * from EMPLOYEE")

 

2

=A1(2).fno(EID)

1, which indicates that the ordinal number of the field "EID" is 1.

3

=A1(2).fno()

9, which indicates that there are 9 fields in the table "Employee".

Related functions:

T.fno()