You are viewing the documentation for Blueriq 15. Documentation for other versions is available in our documentation directory.

IFUNKNOWN


Alternative notation of the ISUNKNOWN function, which increases readability especially for long expressions. This function replaces a value if that value is unknown.


The IFUNKNOWN function takes precedence over any other binary operator (except for the "NOT" operator). For example, this means that the expression A.B AND C.D IFUNKNOWN FALSE will be interpreted as A.B AND (C.D IFUNKNOWN FALSE). You can use parentheses to influence this behavior, e.g. by writing (A.B AND C.D) IFUNKNOWN FALSE. For the "NOT" operator the following expression "X AND NOT B IFUNKNOWN FALSE", can also be read as "X AND ((NOT B) IFUNKNOWN FALSE)"


Syntax

expression IFUNKNOWN value


Inputs

  • expression- Expression of which the value has to be returned if that value is known.

  • value - Value to return if the expression value is unknown.


Return type

  • any type, equals the expression type


Examples

Suppose the following data model.


Person.namePerson.SequenceNumberPerson.HasDrivingLicense
“Bob”654true
“Jane”?true
“Mary”667false
“Rick”??
“Ron”?false
“Jenny”765true
?111true
Active PersonExpressionResultType
Jane - ? - truePerson.SequenceNumber IFUNKNOWN 999 999Integer
Mary - 667 - falsePerson.SequenceNumber IFUNKNOWN 999667Integer
? - 111 - truePerson.Name IFUNKNOWN "customer""customer"String
"Rick" - ? - ?NOT Person.HasDrivingLicense IFUNKNOWN falsefalseBoolean




Both parameters of the IFUNKNOWN function must be of the same datatype. If they differ in datatype, you get this validation error in studio:

Could not find function: IFUNKNOWN matching arguments System.Collections.ArrayList

Back to Top