r.field(F,x)

Read(642) Label: modify, specified field value,

Description:

Modify a value of the specified field of a record.

Syntax:

r. field(F,x)

Note:

The function modifies the value of the Fth field of record r, or the value of string parameter F, into x. Count backward if F<0. Do not execute if F exceeds the boundary number of the fields or it does not exist.

Parameter:

r

A record

F

Ordinal number of a field, or the string parameter in which a variable can be used to reference the field name

x

Expression whose computing result is the value of the Fth field, or the value of the string parameter F

Return value:

None

Example:

 

A

 

1

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

2

=A1(1).field(2,"Admin1")

Change the value of the 2nd field of the record 1 to Admin1.

3

=A1(1).field(-1,10000)

Modify the value of record 1’s last field into 10,000.

4

>arg1="SURNAME"

 

5

=A1(1).field(arg1,"Lily")

Modify the value of record 1’s SURNAME field into Lily.

Related function:

A.field(F)

A.field(F,x)

r.field(F)