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

Form "time entry"

Hi All,

I am currently having issues with creating an entry field that allows the user to select/input a time, I am using "Text(Now(), DateTimeFormat.ShortTime)" as the Defult Data and ""Text(DateTimeFormat.ShortTime)" as the format. However, this is not ideal as the user has to manually type in the time and this is inconvenient for the user and will create variances in the data entries between users. I was wondering if there was a way to make it more user friendly, for example have it as a selection like the date picker control.

 

Any help/advice would be much appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Form "time entry"

Hi @whitciv,

Could you please share a bit more about your scenario?

Do you want your users to select a time value rather than type manually within your app?

Based on the needs that you mentioned, I think the Dropdown controls could achieve your needs.

I have made a test on my side, please take a try with the following workaround:2.JPG

 

3.JPG

 

4.JPG

Set the OnVisible property of the screen which contains the Time entry input box to following:

Set(SelectedTime, Blank())

Set the Default property of the Text Input box (Time Input box) to following:

If(!IsBlank(SelectedTime), SelectedTime, Text(Now(), DateTimeFormat.ShortTime))

 

Set the Items property of the HourDropdown box to following:

["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]

Set the OnChange property of the HourDropdown box to following:

Set(SelectedTime, Time(Value(HourDropdown.Selected.Value),Value(MinuteDropdown.Selected.Value),0))

Set the Items property of the MinuteDropdown box to following:

["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"]

Set the OnChange property of the MinuteDropdown box to following:

Set(SelectedTime, Time(Value(HourDropdown.Selected.Value),Value(MinuteDropdown.Selected.Value),0))

Please check the attached GIF screenshot for more details:

 

 

Best regards,

Kris

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.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Form "time entry"

Hi @whitciv,

Could you please share a bit more about your scenario?

Do you want your users to select a time value rather than type manually within your app?

Based on the needs that you mentioned, I think the Dropdown controls could achieve your needs.

I have made a test on my side, please take a try with the following workaround:2.JPG

 

3.JPG

 

4.JPG

Set the OnVisible property of the screen which contains the Time entry input box to following:

Set(SelectedTime, Blank())

Set the Default property of the Text Input box (Time Input box) to following:

If(!IsBlank(SelectedTime), SelectedTime, Text(Now(), DateTimeFormat.ShortTime))

 

Set the Items property of the HourDropdown box to following:

["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]

Set the OnChange property of the HourDropdown box to following:

Set(SelectedTime, Time(Value(HourDropdown.Selected.Value),Value(MinuteDropdown.Selected.Value),0))

Set the Items property of the MinuteDropdown box to following:

["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"]

Set the OnChange property of the MinuteDropdown box to following:

Set(SelectedTime, Time(Value(HourDropdown.Selected.Value),Value(MinuteDropdown.Selected.Value),0))

Please check the attached GIF screenshot for more details:

 

 

Best regards,

Kris

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.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,915)