Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to use the action in a button to do the following in order:
vVarable2 = if vVariable2 < vVariable1, vVariable1, vVarable2
vVarable3 = if vVariable3 < vVariable2, vVariable2, vVarable3
vVarable4 = if vVariable4 < vVariable3, vVariable3, vVarable4
I have 3 "Set Variable" actions in a button in this order:
Variable: vVarable2 Value: if vVariable2 < vVariable1, vVariable1, vVarable2
Variable: vVarable3 Value: if vVariable3 < vVariable2, vVariable2, vVarable3
Variable: vVarable4 Value: if vVariable4 < vVariable3, vVariable3, vVarable4
The problem (for example) is this:
Before I click button:
vVariable1 = 50
vVariable2 = 0
vVariable3 = 0
vVariable4 = 0
Click button first time:
vVariable1 = 50
vVariable2 = 50
vVariable3 = 0
vVariable4 = 0
Click button secondtime:
vVariable1 = 50
vVariable2 = 50
vVariable3 = 50
vVariable4 = 0
Click button third time - The result I want!
vVariable1 = 50
vVariable2 = 50
vVariable3 = 50
vVariable4 = 50
I want to be able to click the button once and get the result of all variables being 50.
Or maybe like this?
1) vVariable2
=RangeMax(vVariable1, vVariable2)
2) vVariable3
=RangeMax(vVariable1, vVariable2,vVariable3)
3) vVariable4
=RangeMax(vVariable1, vVariable2,vVariable3,vVariable4)
Can you check the attached and see if this is what you wanted?
UPDATE:
1) vVariable2
=If(vVariable2 < vVariable1, vVariable1, vVariable2)
2) vVariable3
=If(vVariable2 < vVariable1,
If(vVariable3 < vVariable1, vVariable1, vVariable3),
If(vVariable3 < vVariable1, vVariable2, vVariable3))
3)
=If(vVariable2 < vVariable1,
If(vVariable3 < vVariable1,
If(vVariable4 < vVariable1, vVariable1, vVariable4),
If(vVariable4 < vVariable3, vVariable3, vVariable4)),
If(vVariable4 < vVariable2, vVariable2, vVariable4))
I would suggest checking the results in other scenarios as well to make sure that this is working in all cases.
Best,
Sunny
Or maybe like this?
1) vVariable2
=RangeMax(vVariable1, vVariable2)
2) vVariable3
=RangeMax(vVariable1, vVariable2,vVariable3)
3) vVariable4
=RangeMax(vVariable1, vVariable2,vVariable3,vVariable4)
Hi,
With small correction to swuehl reply, try the following code. It is working as per your requirement.
1) vVariable4
=RangeMax(vVariable3, vVariable4)
2) vVariable3
=RangeMax(vVariable3,vVariable2)
3) vVariable2
=RangeMax(vVariable2,vVariable1)
Thanks,
Reshma M.
Very helpful. Thanks!
Zag
Thanks so much!
Zag
No problem at all. I am glad we were able to help