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

Different behaviour between iOS, Desktop and Android (Toggle Check/UnCheck actions based on Default property)

Hi All,

I'm experiencing some strange behaviour in one of my canvas apps using a component and a toggle, where the app works as designed on both Desktop and Android, but it doesn't function on iOS.


Some background:

  • I have collection of distance marks (one record for each distance), lets call it colDistances. This collection is shown in a gallery.
  • The app user can add distance mark to colDisntances.
  • The app user can delete distance marks created from colDistances.
  • To add or delete distance marks, the user needs to provide the new distance and confirm deletion respectively.
  • Both actions are captured in this gif (working on Desktop):
    2019-07-31_13-37-01.gif
  • Both actions use a Dialog Component, and a Toggle.

The PowerApp process:

  1. When the user clicks the add or delete button, they are shown a dialog, based on a component that is configured differently for each action.
  2. There is (hidden) Toggle' with its Default is set to an output value of the Dialog Component that indicates its visibilty. 
  3. When the user inputs a value (if applicable, e.g. the new distance mark) and selects one of two buttons on the Dialog Component, the inputted value and button clicked are saved as two output values of the component.
  4. When the dialog component is closed through clicking the button, the Default of the Toggle is set to false. This means the functions in the Toggle's UnCheck property are exectured.
  5. The Toggle's UnCheck property contains the function(s) that either adds or deletes distance mark based on the Dialog Component's inputted value and/or clicked buttons output value(s).

The problem:

All of the above works perfectly on both Desktop (in play mode as well as in the editor) and Android. When either of the actions are however performed on an iOS device (testing with iPad Pro and iPhone 10) the actions result in nothing the first time. Only the second time the same action is performed it works as intended.

As one could imagine, needing to perform an action twice every time is very annoying (#firstworldproblems). Hence I'm reaching out to you. Does anybody have any ideas as to how I could solve this? And perhaps why execution of the functions in the UnCheck property behaves differently cross-platforms.

3 REPLIES 3
Community Support Team
Community Support Team

Re: Different behaviour between iOS, Desktop and Android (Toggle Check/UnCheck actions based on Default property)

Hi @ROB365 ,

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned.

 

As an alternative solution, please take a try with the following workaround:

Set the OnChange property of the Toggle control to following:

If(
   Toggle1.Value,
   "Type your Check formula here",
   "Type your UnCheck formula here"
)

Please consider type your formula within the OnChange property of the Toggle control rather than the OnCheck property or OnUncheck property.

 

Please consider take a try with above solution, then re-publish your app, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PowerApps Staff tahoon
PowerApps Staff

Re: Different behaviour between iOS, Desktop and Android (Toggle Check/UnCheck actions based on Default property)

Can you describe the exact values of Toggle.Default and Toggle.OnUncheck? You mentioned that it is set to an output property of the component. How is that output property configured?

You can narrow down the cause of the problem by adding what I call "debugging labels". For example, insert a Label that has its Text property set to the output property of the component. This way, you can easily see the output value of the component. If the Label shows the expected value, then the bug is specific to the Toggle control. If the Label also shows the wrong value, then the bug is with the component that produces the output value.

ROB365
Level: Powered On

Re: Different behaviour between iOS, Desktop and Android (Toggle Check/UnCheck actions based on Default property)

Hi @v-xida-msft,

Thanks for your suggestion, I have tried moving the code to the OnChange as opposed to the UnCheck but sadly that gives the same result. It still needs to be exectuted twice on iOS.

 

Any other suggestion? Thanks Smiley Happy

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 430 members 5,158 guests
Please welcome our newest community members: