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

Date picker now() not refreshing

Hello,

 

I've been looking other threads & Google for help on this issue, but i cannot find something similar so i decided to ask for help.

 

I'm creating a simple app, for registering customer visits. There is a main screen with 3 buttons and when the customer clicks on "Register Visit" a screen with a form (linked to a excel datasource, hosted in Onedrive) with the requested fields is shown.

In this form, i have a DataCard for picking a date. This datacard has 3 boxes for setting the date, one for selecting the day, one for selecting the hour and the last box for selecting the minutes.

I have set the "DefaultDate" on those 3 boxes (DateValue1, HourValue1, MinuteValue1) to the "Now()" function, but this only seems to refresh the data when i open the app for editing in PowerApps Studio. Even if i run the app, the date shown is not refreshed.

I mean, if i start editing the app at 10:00, when i look at the screen in which this control is, the date shown is correct:

DateValue1: 29/09/2017

HourValue1: 10

MinuteValue1: 00

 

But if i wait some minutes and i run the preview of the app, those values are not refreshing.

I've tried reseting the form with the "OnVisible" event of its screen but this doesn't work... any ideas?

 

What i want to achieve, is to register the actual time in which a Customer Visit is registered

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver I
Resolver I

Re: Date picker now() not refreshing

Hi,

 

Build a timer which sets a variabele with Now() and let it fire every 5 seconds or something like that. Then use that variable in your DefaultDate.

 

This behaviour is inherent to the design of PowerApps, it's Data-driven and not event-driven.

View solution in original post

2 REPLIES 2
Highlighted
Resolver I
Resolver I

Re: Date picker now() not refreshing

Hi,

 

Build a timer which sets a variabele with Now() and let it fire every 5 seconds or something like that. Then use that variable in your DefaultDate.

 

This behaviour is inherent to the design of PowerApps, it's Data-driven and not event-driven.

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Date picker now() not refreshing

Thanks for your answer. It has been very helpful.

 

Finally i have taken your idea, but i've replaced the date pickers for a single textbox.

I was having trouble making the hour and minutes pickers working with that variable, but the DatePicker works as you said, but as i don't want to let the users change the date, using a textbox instead is fine.

 

Regards

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published 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 (6,681)