Solved

ifElse Statements in Variables, Between two decimals - New Responsive Form designer


I am trying to find a way to create ifElse statements in the New Responsive Designer under variable, for numbers in between two decimals. I loved the video tutorial for ifElse statements in the Risk Matrix, but unfortunately, with decimals, I have too many possible numbers to add them all as == . Is there a way to create a statement that allows for ifElse to search between two numbers (in my case, decimals), to evaluate to true/false?

 

My Example: 

7736i872B5DEFBA132C83.png

 

I would like to get the number of possible points, based on if they fall between the lower and upper numbers. 

icon

Best answer by Bobbie-Lee 7 May 2020, 15:40

View original

5 replies

I believe I have answered my own question. For anyone else who needs it:


 


ifElse
(
[Form].[decReturnRate]>.000 && [Form].[decReturnRate]<.020,30,

ifElse
(
[Form].[decReturnRate]>.019 && [Form].[decReturnRate]<.050,28,

ifElse
(
[Form].[decReturnRate]>.049 && [Form].[decReturnRate]<.100,26,

ifElse
(
[Form].[decReturnRate]>.099 && [Form].[decReturnRate]<.200,24,

ifElse
(
[Form].[decReturnRate]>.199 && [Form].[decReturnRate]<.300,22,

ifElse
(
[Form].[decReturnRate]>.000 && [Form].[decReturnRate]<.019,20,

ifElse
(
[Form].[decReturnRate]>.399 && [Form].[decReturnRate]<.600,18,

ifElse
(
[Form].[decReturnRate]>.599 && [Form].[decReturnRate]<.800,16,

ifElse
(
[Form].[decReturnRate]>.799 && [Form].[decReturnRate]<1.00,14,

ifElse
(
[Form].[decReturnRate]>1.000,12, 0

)
)
)
)
)
)
)
)
)
)
Userlevel 5
Badge +19

@Bobbie-Lee I'm not sure if you could maybe do something like this:



You would just be setting a boolean to be equal if your number is greater than the first number or less than the second. This could then be added to an IfElse formula if needed as well.


 



 

Userlevel 5
Badge +19
Ahh looks like you might have gotten it figured out! Sorry I didn't see your post.

@butlerj wrote:
Ahh looks like you might have gotten it figured out! Sorry I didn't see your post.


No, thank you for getting back to me so fast! I always appreciate a different way of thinking about a problem. I really appreciate it! This may be a better-suited method next time I have a similar variable.

Badge +2

I found this topic as I searched for input on using the IfElse function in a responsive form for a similar task.


 


I have used the IfElse previously to set the redirect-to URL when the user clicks the Submit button, but I would also like to use it to set a default value in a simple text field.


 


My issue is that when I attempt to use IfElse within the field's default value rule I cannot gain access to form (or SharePoint) variables within the default value calculation.


 


Am I missing something here?

Reply