Hey people,
I have created gallery control with items in it:
["Vehicle Inspection","Fluids","Hoses"]
I have created the containers , so as if we click any item from gallery control the corresponding container will be shown on the screen.
By default set the visible property of screen false:
UpdateContext({conFluidVisible:false,conVehInspectVisible:false})
Set the OnSelect property of button control of gallery :
If(
ThisItem.IsSelected,
Switch(
ThisItem.Value,
"Fluids",
UpdateContext ({conFluidVisible: !conFluidVisible}),
"Vehicle Inspection",
UpdateContext({conVehInspectVisible:true})
)
)
Now the problem I'm facing is, how to set visible property of all container false, else the container which is active (active here means the button clicked by user from gallery item). As all the containers are getting collapsed with each other when clicked on different gallery items.
Please help
Thanks in advance:)
Solved! Go to Solution.
@Tiksha I found an easier way to do this
Gallery button or > in my case -
Onselect - Set(Var,ThisItem.Value);Clear(ColVar);Collect(ColVar,Var)
Container 1
Onvisible - If("Vehicle Inspection" in ColVar,true)
Container 2
If("Fluids" in ColVar,true)
Screen
OnVisible - Clear(ColVar)
Hope this helps.
------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Do you mean the datacards in the form if so each datacard has an individual visible property 🙂
Signature:
If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !
Link to the Power Platform Professionals United Kingdom User Group:
@AJ_Z , Instead of data card I have used the containers and sets there visible property as :
ConFluid visible property as conFluidVisible and ConVehicleInspection visible property as conVehInspectVisible:
But I'm unable to set visible property of the following variable false/hide as soon as user clicks the another button of gallery control.
The containers are collapsing with each other
As I what I want is if user clicks the gallery item(button1), container1 will be shown, if clicks item(button2),container2 will be visible and so on.
@Tiksha I found an easier way to do this
Gallery button or > in my case -
Onselect - Set(Var,ThisItem.Value);Clear(ColVar);Collect(ColVar,Var)
Container 1
Onvisible - If("Vehicle Inspection" in ColVar,true)
Container 2
If("Fluids" in ColVar,true)
Screen
OnVisible - Clear(ColVar)
Hope this helps.
------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
User | Count |
---|---|
252 | |
104 | |
94 | |
50 | |
39 |