cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
fmigg
Regular Visitor

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
RandyHayes
Super User
Super User

@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 below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

1 REPLY 1
RandyHayes
Super User
Super User

@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 below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,661)