Hello MSFT guys,
I am facing a different behavior of PowerApps whether I am in preview mode or running the published app.
Here is the case to reproduce:
- Create a canvas blank app
- Add a button with:
OnSelect = Set(gloVar, true)
- Add a label with:
Text = gloVar
- Add a new blank screen
- On this new blank screen add a toggle with:
Default = gloVar
OnCheck = Notify("Hello", NotificationType.Information); Set(gloVar, false)
Now run the app in preview mode:
- when you click on the button the notification is shown
- you don't have time to see the swapping of the label because it's too fast (don't care)
- in fact, everytime you click the button the notification is shown (that's what I expect)
Now publish the app an run the published version:
- when you click on the button the label goes to TRUE but the OnCheck event of the toggle on the other screen is not triggered
Why is this ? Is it a bug ?
Behaviors should be EXACTLY the same whether in preview mode or on the published app... Otherwise we can loose days and days not figuring out why things are not working (which just happened to me 😞 ).
IMPORTANT: note that if you put the toggle on the same screen as the button, then it works both in preview mode and on the published app.
Personal note: if it is by design it's a real shame because I was planning on using this technique to centralize code on a hidden screen that I would trigger through a global variable...
MSFT guys: thanks for your analysis...
Emmanuel