OK. let me explain more detail. We have a BO called Chamicals which has an attribute Name(Plain text). All instances of Chemical.Name are the verified by experts. Another BO called Customer which has an attribute MyChemical to refer to Chemicals BO. When import data for Customer, one of fields in cvs file is Customer.MyChemical.Name. I'd like to ensure all the data under Customer.MyChemical.Name must match one of the instance of Chemicals(build relation). and eliminate the data which do not in Chemicals. But a blank value of Customer.MyChemical.Name is valid. So I defined a rule:
If NOT(EXISTS Chemicals WHERE (Chemicals.Name=ThisCustomer.MyChemicals.Name)) AND ThisCustomer.MyChemicals.Name IS DEFINED Then
REPORT ERROR 'No such Chemical Name.'
I found above rule couldn't work as I expected because the two conditions never get True at the same time. It allows both blank value and unmatched data to be imported (changes unmatched data to blank).
So I tried to use
If NOT(EXISTS Chemicals WHERE (Chemicals.Name=ThisCustomer.MyChemicals.Name)) Then
REPORT ERROR 'No such Chemical Name.'
This time, both blank value and unmatched data were found and reported. So does the rule:
If ThisCustomer.MyChemicals.Name IS UNDEFINED Then REPORT ERROR 'No such Chemical name'
The root cause is AwareIM treats both blank value and unmatched data as "IS UNDEFINED".
So any other rule defining way can help me?