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

Record.FieldOrDefault

Owen Duncan|Last Updated: 10/5/2018
|
1 Contributor

About

Returns the value of a field from a record, or the default value if the field does not exist.

Record.FieldOrDefault(record as record, field as text, optional defaultValue as any) as any  

Arguments

ArgumentDescription
recordThe Record to check.
fieldThe field to return.
optional defaultValueThe default value to return if the field does not exist.

Examples

Record.FieldOrDefault([CustomerID =1, Name="Bob"], "Phone") equals null  
Record.FieldOrDefault([CustomerID =1, Name="Bob"], "Phone", "123-4567") equals "123-4567"  
© 2018 Microsoft