Here’s how to use paste() function.
Description:
Loop through the records of a sequence to modify the specified field of a table sequence in order.
Syntax:
T.paste(Ai:Fi,…;k)
Note:
The function loops through the records of sequence Ai to modify the values of Fi field of table sequence T from the kth record. The modification will stop once the the number of records that have been modified reaches this result number.
Parameters:
T |
A table sequence |
Ai |
A table sequence/record sequence/sequence, whose records/members will be values of Fi field |
Fi |
The field to be modified; when it isn’t supplied, modify the ith field of T |
k |
The position the modification starts. The default is 0, in which case records or members will be appended at the end. |
Options:
@i |
Loop through the records of sequence Ai to insert them to Fi field of table sequence T before the kth record. |
Return value:
A table sequence
Example:
|
A |
|
1 |
=demo.query("select * from DEPARTMENT").keys(DEPT) |
|
2 |
=A1.modify(1,"Sales",5) |
|
3 |
=demo.query("select * from DEPARTMENT") |
|
4 |
=A3.paste(A1:DEPT,[20,10,20]:MANAGER;3) |
Modify values of records according to different fields |
5 |
=A3.paste@i(A1:DEPT,[20,10,20]:MANAGER;3) |
Insert values according to different fields. |