Not IsEmpty ( Holding Area Active Members Table:Company Name )
if evaluated from the context of Companies, will be true only if a related record exists.
My code is below.
So if the table "Company" had values "Northwood" and "My company" for the field "Company", then the field "Does the company exist in the main database ?" should equal "YES" whenever the field "Company Name" on the table "Active area Holding Area" equals either "Northwood" or "My company". However, I always seem to get "NO".
What am I doing wrong ? thanks
Thanks Phil. I have changed my field to calculation and have :-
Does Company exist in main database = If(not IsEmpty(Companies::Company Name);"YES";"NO")
but always seem to get "YES" now ??
What table occurrence did you select as the "context" for your calculation field? It should be the occurrence of Holding Area Active Members used in the relationship that links it to Companies.
If you have defined this field in companies, then you have defined it in the wrong table if you want to check for records in companies from the context of the "Holding area..." table.
Thanks Phil - I believe I have done this - seen attached screenshot. However still getting wrong answer.
You should clear the "do not evaluate if all referenced fields are empty" check box. Otherwise, you'll get an empty field instead of "no".
Other than that, your calculation and relationships look correct. If you are still getting "yes" when you expect to see "no", better check the data in your fields to see why you have matching records when you don't expect them. One way to check that is to go your Holding Area Active Members layout and add the comapny Name field from Companies to the layout to see if you see a name in the field or an empty field.