Skip to main content

Table.Range

Tiek atgrieztas rindas, kas sākas ar norādīto nobīdi.

Syntax

Table.Range(
table as table,
offset as number,
optional count as number
) as table

Remarks

Tiek atgrieztas rindas no table, kas sākas ar norādīto offset. Neobligāts parametrs count norāda, cik rindas tiks atgrieztas. Pēc noklusējuma tiek atgrieztas visas rindas pēc nobīdes.

Examples

Example #1

Tabulā tiek atgrieztas visas rindas, sākot no 1. nobīdes.

Table.Range(
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"],
[CustomerID = 4, Name = "Ringo", Phone = "232-1550"]
}),
1
)

Result:

Table.FromRecords({
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"],
[CustomerID = 4, Name = "Ringo", Phone = "232-1550"]
})

Example #2

Tabulā tiek atgriezta viena rinda, sākot no 1. nobīdes.

Table.Range(
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"],
[CustomerID = 4, Name = "Ringo", Phone = "232-1550"]
}),
1,
1
)

Result:

Table.FromRecords({[CustomerID = 2, Name = "Jim", Phone = "987-6543"]})

Category

Table.Row operations