Explain why this is invalid

OR(
AND([current level]=1,[L1 Assessment Linked].[level 1 score]>94%, [L1 I-CAR Classes].[completed]>84%),
AND([current level]=2,[L2 Assessment Linked].[level 2 score]>94%, [L2 I-CAR Classes].[completed]>84%),
AND([current level]=3,[L3 Assessment Linked].[level 3 score]>94%, [L3 I-CAR Classes].[completed]>84%)
)

I am trying to say that when the Level is X, check that the following items are also true. I am using this for a format rule, so I need a boolean result. Are nested OR/AND functions not supported? I continue to be flummoxed by the spreadsheet-style logic used at times.

Solved Solved
0 12 760
1 ACCEPTED SOLUTION

12 REPLIES 12

Nested OR/AND functions are absolutely supported.

Your syntax looks fine. What exactly is the error?

It says expression invalid. That’s it.

Break the expression down and test each part.
Put just
AND([current level]=1,[L1 Assessment Linked].[level 1 score]>94%, [L1 I-CAR Classes].[completed]>84%)
in the expression editor and test it. Or see if it’s still giving an error. If no error, rinse and repeat with your 2nd AND, etc. This will help you debug what the actual issue is more succinctly.

Instead of saying >84%, use >0.84

Breaking it down, even just putting in:
AND([current level]=1,[L1 Assessment Linked].[level 1 score]>94%, [L1 I-CAR Classes].[completed]>84%)

Still yields the “Invalid expression:” error, without any further explanation from the system.
Changing it to a decimal creates new datatype mismatch errors because it expects % as the columns are of type “percent”… What am I doing wrong here?

Further, I broke it down further and got a little more feedback from the editor:
[L1 Assessment Linked].[level 1 score]>94%
Yields “Expression … does not match the expected format of an AppSheet expression”

…What’s the “correct” format? I have double-checked and the referenced column exists, is spelled correctly, and is of type “Percent”…?

Did you notice @aleksi’s post?

Yes, as I mentioned, that just creates more errors because Appsheet considered it a type mismatch because it expects percentages.

3X_0_c_0c7b374233378497fcbef9cd9210ee44d03c14b8.png

3X_0_2_0206db8eefc786f61804b617fd2ffdbf5c9568f7.png

3X_7_3_732ef4590ab060d5ffd9f7af7bf794839c98524e.png

You’re a gentleman and a scholar, Marc. Although I’d advise Appsheet to change their editor to be “friendlier” in this case.

Got it fixed then? What ended up being the issue?

The silly leading zero before the decimal point.

Top Labels in this Space