Hi All,
Apologies if I am using incorrect terminology, I'm rather new to this, so I'll explain what I mean in case my title does not make sense.
Is it possible to have a variable in Power Apps that is non-binary, with options other than "true" and "false"? For example, I know that you can do the following:
Set(varexampletext,"Example Text"
... and then "Example Text will appear in a Text Input where "varexampletext" is the Default Value.
However, I'm thinking along the lines of the following. Imagine I have four buttons on the top of the screen, ButtonA, ButtonB, ButtonC, and ButtonD. I have four containers all occupying the same space on the main body of the screen, ContainerA, ContainerB, ContainerC, and ContainerD. The OnSelect values of the buttons are as follows:
ButtonA:
Set(varContainerAVis,true):Set(varContainerBVis,false):Set(varContainerCVis,false):Set(varContainerDVis,false)
ButtonB:
Set(varContainerAVis,false):Set(varContainerBVis,true):Set(varContainerCVis,false):Set(varContainerDVis,false)
ButtonC:
Set(varContainerAVis,false):Set(varContainerBVis,false):Set(varContainerCVis,true):Set(varContainerDVis,false)
ButtonD:
Set(varContainerAVis,false):Set(varContainerBVis,false):Set(varContainerCVis,false):Set(varContainerDVis,true)
The "Visible" field for the Containers is:
ContainerA:
varContainerVisA=true
ContainerB:
varContainerVisB=true
ContainerC:
varContainerVisC=true
ContainerD:
varContainerVisD=true
Long story short, considering that only one container need ever be visible at any one time, is the following possible:
ButtonA:
Set(varContainerVis=A)
ButtonB:
Set(varContainerVis=B)
ButtonC:
Set(varContainerVis=C)
ButtonD:
Set(varContainerVis=D)
then set the Containers' "Visible" fields to:
ContainerA:
varContainerVis=A
ContainerB:
varContainerVis=B
ContainerC:
varContainerVis=C
ContainerD:
varContainerVis=D