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

Connection.Connected takes too long

Hi all,

 

I have a form that submits data to a Sharepoint List, but I'm working to save the form as collection where there is no connection. The issue I found is that when I click on submit button with no internet connection from the devices, the app takes too long to 'realize' it is offline (even more than 1 minute). Also, the errors notifications looks too invasive. 

This is the code I have on the submit button:

If( 
Connection.Connected,
    SubmitForm(Form1); Navigate([@'Success Screen1'], ScreenTransition.Fade),
    Collect(Collection1, SubmitForm(Form1));
    SaveData(Collection1, "offlinesave");
    Navigate([@'Success Screen2'], ScreenTransition.Fade)
)

This is the error that appear all the time when I'm offline.

cropped-connection-issue.png

 

Does exists a way to make that connection verification faster? Is not the device since I tested it on two different android tablets, an iPad and an android smartphone, takes same time. 

 

Also, does exist a way to take these invasive errors away? 

Thanks!! 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Connection.Connected takes too long

@fmigg 

There is no real way to resolve alert errors like that from appearing.  The best course of action is to avoid hitting formulas where this might happen.

In your particular Formula, you are performing a SubmitForm if you have detected you are not connected.  This will cause the error you are seeing.

You might want to consider changing your Collect formula to:

   Collect(Collection1, Form1.Updates)

Otherwise, with the SubmitForm in there, it will try to connect and resolve to the server, which will result in an error message.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

1 REPLY 1
Super User
Super User

Re: Connection.Connected takes too long

@fmigg 

There is no real way to resolve alert errors like that from appearing.  The best course of action is to avoid hitting formulas where this might happen.

In your particular Formula, you are performing a SubmitForm if you have detected you are not connected.  This will cause the error you are seeing.

You might want to consider changing your Collect formula to:

   Collect(Collection1, Form1.Updates)

Otherwise, with the SubmitForm in there, it will try to connect and resolve to the server, which will result in an error message.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Helpful resources

Announcements
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

Top Kudoed Authors
Users Online
Currently online: 56 members 3,297 guests
Recent signins:
Please welcome our newest community members: