I want to show a text when two conditions are satisfied. Problem is first condition is value of a slider (n=3) and the second condition is a boolean value (e=true).
In the Conditions to show object box of your text (right click on it, then select the Advanced tab) type
n==3 && e
Double == sign for testing the value
&& means AND
See also this wiki page about Conditional Visibility https://wiki.geogebra.org/e...
and this one about Boolean values and the related syntax in GeoGebra
Is there a way to have more than 2 conditions to show an object?
2 conditions works fine for say a slider and a check box, I currently use:
if(a > 0,b = true)
but I'd like to have a 3rd and possibly 4th condition,
I've tried things like if(a > 0,b = true, c = false) but it only accepts the first 2 conditions and ignores the third.
Any help would be greatly appreciated.
Don't use an If command, just type in the needed conditions in the Condition to show object textbox.
See my examples above and the attached example, where the triangle is shown iif a>0 AND boolean b is true AND boolean c is false.
Right click on the triangle to open its Properties window. Select the Advanced tab and have a look at the Condition to show object, that appears like
a > 0 ∧ b ∧ (¬c)
I've typed in that box
a>0 && b && !c
b means b=true
!c means c=false
You can enter b==true AND c== false which is the longer input, but both are fine.
I could have sworn I'd tried that and it was giving me errors, anyway works perfectly, thanks!
To have many conditions, you can use list :
Comments have been locked on this page!