Examples of boolean expressions
This topic contains examples to demonstrate valid syntax that can be used in boolean expressions in InfoSphere® MDM Custom Domain Hub.
- id.234.response.TCRMPersonBObj.PartyId = 454809
Tests if the PartyId of the TCRMPersonBObj object equals 454809. The TCRMPersonBObj object comes from the response that has a correlator ID 234.
- id.444.response.TCRMPersonBObj.TCRMPersonNameBObj[where
NameUsageType = 1].LastName = 'Smith'
Tests if the LastName equals "Smith". The LastName is from the TCRMPersonNameBObj object where the NameUsageType equals 1. The TCRMPersonBObj object comes from the response that has a correlator ID 444.
- id.900.response.TCRMPersonBObj.TCRMPersonNameBObj[where
NameUsageType = 1].GivenNameTwo = null
Tests if the TCRMPersonNameBObj object where the NameUsageType is 1 has no GivenNameTwo. The TCRMPersonBObj object comes from the response that has a correlator ID 900.
- id.333.response.TCRMPersonBObj.TCRMPersonNameBObj[where
NameUsageType = 1].LastName = 'Smith' or id.444.response.TCRMPersonBObj.TCRMPersonNameBObj[where
NameUsageType = 1].LastName = 'Smith'
Tests if the LastName equals "Smith" in either of the TCRMPersonNameBObj objects, one coming from the response that has a correlator ID 333 and the other that has a correlator ID 444.
- id.333.response.TCRMPersonBObj.TCRMPersonNameBObj[where
NameUsageType = 1].LastName = id.444.response.TCRMPersonBObj. TCRMPersonNameBObj[where
NameUsageType = 1].LastName
Tests if the LastName from the TCRMPersonNameBObj object with the correlator ID 333 equals the LastName from the TCRMPersonNameBObj object with the correlator ID 444.
- count(id.042.response.TCRMPersonBObj.TCRMPartyAddressBObj) >
1
Tests if the number of TCRMPartyAddressBObj object is greater than 1. The TCRMPersonBObj object comes from the response that has a correlator ID 042.
- 454809 = id.234.response.TCRMPersonBObj.PartyId
This example is syntactically incorrect because the left operand cannot be a literal. An exception will be thrown during parsing time.
- id.333.response.TCRMPersonBObj.TCRMPersonNameBObj[where
NameUsageType = 1].LastName = 'Smith' and GivenNameOne = 'John'
You may attempt to write such an expression to perform a logical "and" on the LastName and GivenNameOne of the same TCRMPersonNameBObj object. However, this example is syntactically incorrect because GivenNameOne is not qualified. An exception will be thrown during parsing time. If you do want to write such an expression, the GivenNameOne attribute name must be prefixed like the LastName attribute name.
- id.234.response.TCRMPersonBObj.PartyId = TCRMPartyAddressBObj[where
AddressUsageType = 1].PartyId
You may attempt to write such an expression to compare an attribute of a parent object — that is, TCRMPersonBObj.PartyId — with another attribute of a child object of the same parent object — that is, TCRMPersonBObj.TCRMPartyAddressBObj[where AddressUsageType = 1].PartyId. However, this example is syntactically incorrect because the right operand does not conform to the backward reference syntax. An exception will be thrown during parsing time. If you do want to write such an expression, the right operand must be prefixed with id.234.response.TCRMPersonBObj.
- id.900.response.TCRMPersonBObj.TCRMPersonNameBObj = null
This example is syntactically correct and can be parsed successfully. However, the TCRMPersonBObj object returns zero or many instances of the TCRMPersonNameBObj objects, in a collection. At runtime, the collection cannot be operated on with the null keyword. Therefore, this example will throw an exception at transaction time. If you do want to test if no TCRMPersonNameBObj object is returned, you would write: count(id.900.response.TCRMPersonBObj.TCRMPersonNameBObj) = 0