Why isn't this expression working?

I wrote the following simple expression to bring out some enum options for an enum column in the ValidIf text box.

IFS([Involved Bowel Segment]=โ€œTransverse Colonโ€,{โ€œProximalโ€,โ€œMidโ€,โ€œDistalโ€},[Involved Bowel Segment]=โ€œRectumโ€,{โ€œUpperโ€,โ€œMidโ€,โ€œLowerโ€})

But it receives the following error.
Expression โ€˜IFS([Involved Bowel Segment]=โ€œTransverse Colonโ€,{โ€œProximalโ€,โ€œMidโ€,โ€œDistalโ€},[Involved Bowel Segment]=โ€œRectumโ€,{โ€œUpperโ€,โ€œMidโ€,โ€œLowerโ€})โ€™ could not be parsed due to exception: #VALUE!.

Can anyone tell me whatโ€™s wrong with it?
Thanks

0 2 287
2 REPLIES 2

Hi @djmalaka,

I believe the reason for error is that the enum options you are using in your expression are also used as function names in AppSheet .These words are โ€œUpperโ€, โ€œMid"and"Lowerโ€. There are AppSheet functions exactly by these names. Such words are typically reserved words as the parser could interpret them as functions instead of enum text options. You could slightly alter these words , e.g say โ€œ1Upperโ€ from โ€œUpperโ€ and โ€œ2Midโ€ etc.

I believe then your expression will parse.

Thank you very much.

Top Labels in this Space