Table of contents
TOC
Collapse the table of content
Expand the table of content

Record.ReorderFields

Owen Duncan|Last Updated: 4/19/2018

About

Returns a new record that reorders fields relative to each other. Any fields not specified remain in their original locations. Requires two or more fields.

Record.ReorderFields(record as record,  fieldOrder as list,  optional missingField as nullable number) as record  

Arguments

ArgumentDescription
recordThe Record to modify.
fieldOrderThe list of field orders to change to.
optional missingFieldA MissingField enum value to handle missing fields. The default value is MissingField.Error.

MissingField enum

  • MissingField.Error = 0;

  • MissingField.Ignore = 1;

  • MissingField.UseNull = 2;

Examples

Record.ReorderFields( [CustomerID= 1, OrderID = 1, Item = "Fishing rod", Price = 100.0], { "OrderID", "CustomerID" })  
equals [OrderID = 1, CustomerID = 1, Item = "Fishing rod", Price = 100.0]  
OrderID1
CustomerID1
ItemFishing rod
Price100
© 2018 Microsoft