Report Start Expression: Filter condition

Hi,

I am working on a start expression used to filter a report.
Note the report worked perfectly when its filter was just to grab the data from the table and order it.
Now I am trying to remove some potential rows from this report.

Here is the Expression:

ORDERBY(
FILTER(
Faults,
AND(LEN([Equipment])<=3),
[Equipment]<>โ€œW14โ€,
[Equipment]<>โ€œW22โ€,
[Equipment]<>โ€œW23โ€,
[Equipment]<>โ€œW35โ€,
[Equipment]<>โ€œW38โ€,
[Equipment]<>โ€œW46โ€)),
[Equipment],False)

As you can see I am creating requirements for the rows.
One is tha the length of the name in Equipment is equal to or less than 3.
This works correctly as tested by itself.

My next step was to remove specific results, I attempted this by creating and AND( in the select row portion of the filter expression. For some reason this fails and I cannot work it out.

Appsheet is telling me this expression does not produce a list of ref values?

Solved Solved
0 4 296
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

Your parentheses are wrong:

3X_2_e_2e399da0e0251a008db4ea7bbbdd6e58a0075366.png

Note too that a <<Start>> tag must be a single line; it cannot contain line breaks (though line wrapping done by Docs/Excel/Word is okay).

Try this:

<<Start: ORDERBY(FILTER("Faults", AND((LEN([Equipment]) <= 3), NOT(IN([Equipment],{โ€œW14โ€, โ€œW22โ€, โ€œW23โ€, โ€œW35โ€, โ€œW38โ€, โ€œW46โ€})))), [Equipment], FALSE)>>

View solution in original post

4 REPLIES 4

Steve
Platinum 4
Platinum 4

Your parentheses are wrong:

3X_2_e_2e399da0e0251a008db4ea7bbbdd6e58a0075366.png

Note too that a <<Start>> tag must be a single line; it cannot contain line breaks (though line wrapping done by Docs/Excel/Word is okay).

Try this:

<<Start: ORDERBY(FILTER("Faults", AND((LEN([Equipment]) <= 3), NOT(IN([Equipment],{โ€œW14โ€, โ€œW22โ€, โ€œW23โ€, โ€œW35โ€, โ€œW38โ€, โ€œW46โ€})))), [Equipment], FALSE)>>

Worked a charm thanks @Steve!

Yeah I had been trying every other way I could think of hense the incorrect parentheses.
Thank you for the tip on the Start tag, although mine was correct I just tried to make it more legible.

So the issue I had was not making each section of the and statement a seperate item so to speak with brackets?

The NOT(IN( system is a lot better in every way (I tried this way earlier but couldnt get it working) but effectively works the same no?

The expression you posted had extra โ€œstuffโ€ after the closing parenthesis of the ORDERBY() function. I suspect that extra confused the editor, leading to errors.

It is functionally the same, but more efficient.

I had a similar problem with a workflow template. After trying tons of different troubleshooting efforts, it finally worked when I took out all the returns in the very long expression. Itโ€™s interesting that in the expression editor you can space it out pretty much anyway you want for readability but canโ€™t do that at all with a Start expression.

Top Labels in this Space