In order to find out if the value of a variable already exists in a particular field, I tried this:
but the aggregate function always returns 0 even if the value does exist. It seems that the value of the variable is not available to the formula. Is there some way to use aggregate to test for uniqueness of a variable value in a particular field? If not, any other approaches that would work?