Anybody know how to write this in Tap Forms?
IF(Cups<=2,”Pint”,IF(Cups <=4,”Quart”,IF(Cups<=8,”HALF GALLON”,IF(Cups<=16, “Gallon”))))
Hi DJ,
That looks almost right except for a few things.
1. Use semi-colons between the expressions. And make sure you use straight quotes, not curly quotes.
2. And if you’re building this on iOS, make sure the field names have square brackets around them. If on macOS, then just double-clicking on the field will insert the field “pill” button automatically.
3. You’re missing the Else condition in the final expression.
IF([Cups] <= 2; "PINT";
IF([Cups] <= 4; "Quart";
IF([Cups] <= 8; "Half Gallon";
IF([Cups] <= 16; "Gallon"; "Unknown"))))
You could also return the empty string ""
other than Unknown
if you like. Then nothing will display there when you haven’t provided a value or if it’s greater than 16.