Expression Possible Problem

image
The above formula is to prevent us from duplicating an invoice number, the first half of the expression is getting the list of all current invoices that are not being moved out of the system via Denied/Removed status. The second portion is bringing in the set of all paid invoices based on vendor ID. My test on expression assistant is telling me that it should be invalid but it is not. I don’t see anything inherently wrong with the formula but it seems to be happening elsewhere as well so I’m guessing there is?

What does this mean?

What does this mean?

The test in expression assistant is return False for my valid if formula on the specific row I have found where it in not setting the value to invalid

It is not isolated to this row, I forgot that I didn’t mention any specifics so that statement doesn’t make much sense.

1 Like

It appears to be the second part of my list that is not being brought in at all.

I have the formula NOT’d because I don’t want numbers in the list so I removed that to see what it was disallowing and it is only bringing in the Current invoice numbers.

image

1 Like

Consider breaking the expression into smaller parts and testing them individually to make sure each part gives the expected result.

AND both list individually?

I’d start with the first SELECT() only, noting else. Does it return the expected list?

image
Returns everything except the current row which is by design.
image

When testing the second portion I have nothing. I have added a virtual column that is the select statement of my IN() and the correct list shows up…
image

Second valid if expression tested
image

So this works as intended
image

Where Historical Invoice Numbers is a virtual column with the exact same formula as the select statement that was in its place before hand…

So far the only thing I’ve learned about the IN() statement is just try not to use it. Breaks in Slice Filters, breaks in security filters, and apparently can break in valid if statements.

Wrap it with:

AND(
    TRUE,
    IN(.....)
)