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

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
Venxir
Level: Powered On

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
Venxir
Level: Powered On

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

VictorG
Level: Powered On

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
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 (4,272)