Reputation: 5524
I am trying to on/off a toggle button on a button OnSelect
Action in PowerApps.
Its not working. I have tired code as follows but it did not work:
UpdateContext({DataCardValue8:DataCardValue8.Value=false}) //or
UpdateContext({DataCardValue8.Value=false}) //or
UpdateContext({DataCardValue8.Value:false})
//toggle button control Id is DataCardValue8
Upvotes: 0
Views: 4044
Reputation: 1021
You should set the toggle's Default property to a variable, say MyToggleValue
Then you should set the button's OnSelect to:
UpdateContext({MyToggleValue:!MyToggleValue})
Upvotes: 1