Empty value evaluation should behave differently

So I have this evaluator, let me break it down:

Parameter nav is “Communications” – YES
Search for User-Halls:first item’s User Type doesn’t contain Communications – should be a NO.

The reason why is that the Search for User-Halls returns an empty value, because there is no User-Hall with the search criteria (which is correct, there is none). So the evaluator should result as NO, because there is no User Type to be compared with.

Am I thinking this correctly, logic wise? It is my understanding as so, that’s why I consider this a bug. But I’d love to hear from the forum.

When you display the result as a text or use it as a condition does it return a false/yes?

So far I have not had any issues with similar expressions so I wouldn’t consider it a bug. Also since there is no data, that part of the expression should return empty in the debugger.

1 Like

No, I don’t think so.

As best I can tell from the information provided, each part of the expression on either side of the “and” evaluates to “true” (yes). Therefore, the entire expression is true.

In other words…

  • Is the “nav” parameter “communications”?
    Answer: YES

  • Does the result of the search not contain communications?
    Answer: YES

Therefore, the entire expression is YES.

1 Like

Also since there is no data, that part of the expression should return empty in the debugger.

That’s exactly my questioning. If the condition to be evaluated is does not contain and the evaluator is empty, it is indeed true that the condition should return a yes

But I wonder if this could be optimized somehow.

Because it’s my personal understanding that we can’t make an evaluation over a feature of something that doesn’t exist. So in this case if User Type is empty, the evaluator should throw a NO regardless.

Don’t you agree?

Why can’t you? In logic, everything is no, unless it is yes. There is no state that is ‘nothing’.

Search for User Hall’s first item’s User Type’s Navigation is empty. Therefore, it doesn’t contain Communications. Therefore, the expression = yes.

The only way this expression could evaluate to yes is if the search:first item DOES contain Communications, and that’s impossible if it’s empty.

This isn’t a bug at all - I don’t understand how else you’d want it to behave?!

I handle this by adding a third expression that Search for User-Halls:first item’s User Type is not empty. I enclose the 2nd and 3rd expressions in parentheses so that both have to be true to return a YES. That should do what you are looking for.

1 Like

I agree, there is an issue with the way it evaluates as we might think it should. One way that I overcome this, is add to the expression that the thing searched for is not empty.

I’ve had to do things like this on multiple expressions that look at the field value of a data type, as well as with option sets. Sometimes if the field value or option attribute is a yes/no and you use an expression to evaluate something to the field or attribute is no, then empty fields or attributes evaluate to no, so I often have to use is not yes, but problem with option set attributes, bubble only gives us an expression operate of ‘is yes’, ‘is no’, or ‘is not’ and the problem with the ‘is not’ is after that, we do not get choices of yes or no, which means, having to populate all empty fields or attributes or switch from no to yes.

1 Like

Hmm…to me I would expect the expression “field doesn’t contain value” to return true if the data itself doesn’t exist. If I need to check that the data exists first I would create a compound expression, check that first and then check if the field has the value.

I see we have people on both sides of the wall here.

Honestly I’d rather see the field return ‘empty’ or error, but then it wouldn’t be a boolean no more.

I don’t believe this is a bug any more.

This topic was automatically closed after 14 days. New replies are no longer allowed.