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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (6,519)