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.

Nested OR/AND functions are absolutely supported.

Your syntax looks fine. What exactly is the error?

1 Like

It says expression invalid. That’s it.

1 Like

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.

5 Likes

Instead of saying >84%, use >0.84

3 Likes

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?

1 Like

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

image

image

image

2 Likes

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

1 Like

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

The silly leading zero before the decimal point.

3 Likes