0
function between two numbers
hi everyone
i have the following issue...
I need to show a message following numeric rules.
for example..
if number < 5 then "Result 1"
if number > 10 then "result 3"
but now, how I force "result 2" between 5.1 and 9.9...
I tried if number >5 and <10 then "result 2"
but is not working
thanks in advance
5 replies
-
You probably need nested If statements:
if Number < 5 then "Result 1" else if Number > 10 then "Result 3" else "Result 2" end end
First it checks if the number is less than 5, if it isn't then it checks if it's greater than 10, if it isn't then it must be between the two numbers (result 2).
-
You can use a switch function. It is not intuitive but you can do something like:
switch true do case number < 5: "result 1" case number >= 5 and number < 7.5: "result 2" case number >= 7.5 and number <= 10: "result 3" case number > 10 "result 4" end
number is a field name.
-
If you take a look at this post, you will see that you can use arrays in the switch function.
Content aside
- Status Answered
- 2 yrs agoLast active
- 5Replies
- 203Views
-
4
Following