Record.FieldOrDefault
Syntax
Record.FieldOrDefault(record as nullable record, field as text, optional defaultValue as any) as any
About
Returns the value of the specified field field
in the record record
. If the field is not found, the optional defaultValue
is returned.
Example 1
Find the value of field "Phone" in the record, or return null if it doesn't exist.
Usage
Record.FieldOrDefault([CustomerID = 1, Name = "Bob"], "Phone")
Output
null
Example 2
Find the value of field "Phone" in the record, or return the default if it doesn't exist.
Usage
Record.FieldOrDefault([CustomerID = 1, Name = "Bob"], "Phone", "123-4567")
Output
"123-4567"
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho