Table.First
Tiek atgriezta pirmā rinda vai norādītā noklusējuma vērtība.
Syntax
Table.First(
table as table,
optional default as any
) as any
Remarks
Tiek atgriezta table pirmā rinda vai neobligāta noklusējuma v ērtība default, ja tabula ir tukša.
Examples
Example #1
Atrodiet tabulas pirmo rindu.
Table.First(
Table.FromRecords({
[CustomerID = 1, Name = "Bob", Phone = "123-4567"],
[CustomerID = 2, Name = "Jim", Phone = "987-6543"],
[CustomerID = 3, Name = "Paul", Phone = "543-7890"]
})
)
Result:
[CustomerID = 1, Name = "Bob", Phone = "123-4567"]
Example #2
Atrodiet tabulas ({}) pirmo rindu vai tiek atgriezts [a = 0, b = 0], ja tukšs.
Table.First(Table.FromRecords({}), [a = 0, b = 0])
Result:
[a = 0, b = 0]
Category
Table.Row operations