Record.FieldOrDefault
किसी रिकॉर्ड में निर्दिष्ट फ़ील्ड का मान या फ़ील्ड न मिलने पर डिफ़ॉल्ट मान लौटाता है.
Syntax
Record.FieldOrDefault(
record as record,
field as text,
optional defaultValue as any
) as any
Remarks
रिकॉर्ड record
में निर्दिष्ट फ़ील्ड field
का मान लौटाता है. अगर फ़ील्ड नहीं मिलती, तो वैकल्पिक defaultValue
को लौटाया जाता है.
Examples
Example #1
रिकॉर्ड फ़ील्ड "फ़ोन" का मान ढूँढें या यदि वह मौजूद नहीं है तो नल लौटाएँ.
Record.FieldOrDefault([CustomerID = 1, Name = "Bob"], "Phone")
Result:
null
Example #2
रिकॉर्ड में "फ़ोन" का मान ढूँढें या यदि वह मौजूद नहीं है तो डिफ़ॉल्ट लौटाएँ.
Record.FieldOrDefault([CustomerID = 1, Name = "Bob"], "Phone", "123-4567")
Result:
"123-4567"
Category
Record.Selection