cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Chicko29
Level: Powered On

Make datacard visible based on the value of two Toggles

I'd like to make a datacard visible whenever two toggles are on yes. Say you have toggle 1 and 2.

Toggle 1 makes toggle 2 visible. Toggle 2 makes the datacard visible. If toggle 1 says no, I want the datacard to be invisible regardless of toggle 2. There are wo ways I could do this:

- Make the datacard's visibility dependent on toggle 1 and 2

- Set toggle 2 to be no whenever toggle 1 is on no

 

I don't know how to do either. I tried using an if statement on the Default property of the datacard: if(toggle1.value = "Yes", True, False) but I get an error. I also tried If(toggle1.value = "Yes" & toggle2.value = "Yes" , True, False)

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Make datacard visible based on the value of two Toggles

Hi @Chicko29,

You could do this using the UpdateContext() function.  

  • Toggle1:
    • OnCheck property: UpdateContext({vis:true})
    • OnUncheck property: UpdateContext({vis:false})
  • Toggle2
    • Visible property: vis
    • OnCheck property: UpdateContext{metoo:true})
    • OnUncheck property: UpdateContext{metoo:false})
  • DataCard
    • Visible property: If(vis && metoo,true,false)

If this answers  your question, please mark this thread solved.  

View solution in original post

1 REPLY 1
Super User
Super User

Re: Make datacard visible based on the value of two Toggles

Hi @Chicko29,

You could do this using the UpdateContext() function.  

  • Toggle1:
    • OnCheck property: UpdateContext({vis:true})
    • OnUncheck property: UpdateContext({vis:false})
  • Toggle2
    • Visible property: vis
    • OnCheck property: UpdateContext{metoo:true})
    • OnUncheck property: UpdateContext{metoo:false})
  • DataCard
    • Visible property: If(vis && metoo,true,false)

If this answers  your question, please mark this thread solved.  

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,746)