Expression Possible Problem

3X_8_2_82b1c2182339fab1d50997b36ab088e99e56792d.png
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?

0 10 150
10 REPLIES 10

Steve
Platinum 4
Platinum 4

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.

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.

3X_c_f_cfb0e3e479fb2dce334e73b3c27fd344f63f1fe3.png

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?

3X_a_2_a245a0b8bbd63df18e9e5e8086d1710f2901eeac.png
Returns everything except the current row which is by design.
3X_f_e_fef4a099f2233fbd1d6b5c0130055237202bb886.png

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โ€ฆ
3X_1_2_12703d265b4b01d3a2397a5d6eceec56927b8aa0.png

Second valid if expression tested
3X_0_6_069b0509d22ccb3b431043e399b95a59d3731f91.png

So this works as intended
3X_3_d_3d7e7fa893760d68a27e893f61362427a0c7487c.png

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(.....)
)
Top Labels in this Space