cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

Catching up Date/Time when there is no Internet Connection

Hi guys,

 

short question: Is it possible to get the date/time when the PowerApp is launched in flightmode? I want to use that data as a sort of ID when the formular is filled out and later transfered to Flow...

Thanks!
Julian

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User II
Dual Super User II

Re: Catching up Date/Time when there is no Internet Connection

In addition to what @mdevaney said for determining when you are offline. The Now() function will work whether you are online or Offline.  I tested it on a mobile device in Flight mode and the app was still able to access the current date and time.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: Catching up Date/Time when there is no Internet Connection

@julianhoewel_95 

You can detect whether the PowerApp has a connection using this code

 

Connection.Connected

 

To determine when a PowerApp lost the connection you could create a Timer control with these properties

 

AutoStart: true
Duration: 10000
OnTimerEnd: Set(connectionLostDatetime,If(!Connection.Connected,Now()))
Repeat: true

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Dual Super User II
Dual Super User II

Re: Catching up Date/Time when there is no Internet Connection

In addition to what @mdevaney said for determining when you are offline. The Now() function will work whether you are online or Offline.  I tested it on a mobile device in Flight mode and the app was still able to access the current date and time.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Highlighted
Community Support
Community Support

Re: Catching up Date/Time when there is no Internet Connection

Hi @julianhoewel_95 ,

Do you want to capture the date time within your app when the there is no Internet connection?

 

I agree with @Pstork1 's thought almost. The Now() function could achieve your needs. Regardless of whether or not your are in a flightmode, the Now() function works well.

Actually, the Now() function retrieve the native date time from your Mobile device, rather than send an HTTP request to get the current date time, so the Now() function is not subject to network.

 

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.

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,342)