Record.RenameFields
Syntax
Record.RenameFields(record as record, renames as list, optional missingField as nullable number) as record
Informácie
Vráti záznam po premenovaní polí vo vstupe record
na nové názvy polí zadané v zozname renames
. Pre viaceré premenovania možno použiť vnorený zoznam ({ {old1, new1}, {old2, new2} }.
Príklad č. 1
Premenujte pole UnitPrice na Price zo záznamu.
Použitie
Record.RenameFields(
[OrderID = 1, CustomerID = 1, Item = "Fishing rod", UnitPrice = 100.0],
{"UnitPrice", "Price"}
)
Výkon
[OrderID = 1, CustomerID = 1, Item = "Fishing rod", Price = 100.0]
Príklad č. 2
Premenujte pole UnitPrice na Price a pole OrderNum na OrderID zo záznamu.
Použitie
Record.RenameFields(
[OrderNum = 1, CustomerID = 1, Item = "Fishing rod", UnitPrice = 100.0],
{
{"UnitPrice", "Price"},
{"OrderNum", "OrderID"}
}
)
Výkon
[OrderID = 1, CustomerID = 1, Item = "Fishing rod", Price = 100.0]
Pripomienky
https://aka.ms/ContentUserFeedback.
Pripravujeme: V priebehu roka 2024 postupne zrušíme službu Problémy v službe GitHub ako mechanizmus pripomienok týkajúcich sa obsahu a nahradíme ju novým systémom pripomienok. Ďalšie informácie nájdete na stránke:Odoslať a zobraziť pripomienky pre