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:
OnSelect = Set(gloVar, true)
Text = gloVar
Default = gloVar OnCheck = Notify("Hello", NotificationType.Information); Set(gloVar, false)
Now run the app in preview mode:
Now publish the app an run the published version:
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
Is this issue still in backlog or has it been addressed? I have an issue that is similar in that the Published vs the Previewed app behave differently. For me, some of the controls in some canvas components are rendering at different sizes. See First Instance of Canvas Components are Rendering Incorrectly
@R3dKap @RandyHayes , this is on our backlog. At this time, if you would like to use this workaround with the toggle, you'll need to work within its limits.
As for your other question about components, please write a new post so that it is at the top of its own thread and with details on how you made your component. You can include the tag #components.
Hello @Mr-Dang-MSFT,
About the difference of behavior between design and run-mode, how could we move forward on this problem ? Is there a team inside the PowerApps global team that is responsible for making sure that both design-mode and run-mode behave the same ? And when it's not the case, how can we address the issue ?
It's been a few days now I have another issue with a custom component (very simple one: dialog box with 2 buttons) that makes every screen where I place it crash (the screen does not render). The strange thing is that it works fine in design-mode but not in run-mode... again.
I'd really appreciate it if the PowerApps team could have a look at this issue...
Thanks for your help,
Emmanuel
Yes, again I have to agree, design time and play time should be the same results. I'd rather have something not function properly at design time than the other way around. Mainly because it makes me wonder...what else is like this that is lurking in the works?
The workaround that @Mr-Dang-MSFT suggests is sufficient to resolve the problem, but it doesn't address the concern.
As for the problem...well, I've got a lot of ideas on that one, but they go more to the core of the PowerApps design itself and given the age of the product, it might be a while until those ideas would ever come to light.
Thank you for your insights @Mr-Dang-MSFT. Indeed I noticed that putting a control linked to the one holding the code on a nother screen allowed me to trigger it.
Nevertheless, exactly as @RandyHayes says it here, having a different behavior in design time than in run time should not be. Design preview and run time should behave exactly the same. I personally lost two days of work because of this...
What's your opinion on this particular matter ?
@R3dKap ,
I answered a similar question for @RandyHayes @vsslasd @KroonOfficeSol here:
I want to set the expectations here: by design, controls are not meant to trigger their actions while on another screen; they are dormant. Using a toggle on another screen is very much a work around, and as such may not work the way you would expect.
If you still want to proceed using this pattern knowing this, you need to do one thing:
I think what you're really looking for is a macro though, and I'd suggest upvoting the idea below and similar ones here:
This is actually confirmed. We recently had a discussion about it in this post.
Bottom line is, on your screen with the button, add another control that references the Toggle. For me, I add a label control with the text property set to : Togglex.Value
I then just make that label visible=false
With the reference to the toggle on your screen, it will then work properly in "Play" mode.
Totally agree...design mode and play mode should be equal!
Hope that helps you.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.