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

Dropbox auto select depend on current time

Hi All,

Please help me in this case, I am practicing write an app

 

I have a DropBox (["SHIFT1","SHIFT2","SHIFT3"]

How to make this Dropbox auto chose the right SHIFT, depend on the Now() time

IF       06:30 AM  >=  Now()  >  02:30 PM => SHIFT 1

IFElse 02:30 PM  >=   Now()  > 10:30 PM => SHIFT 2

Else => SHIFT 3

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @Phu_Le ,

Do you want to the drop down's selected value change according to time?

I'm afraid it's not supported to change the selected value directly.

As alternative way, I suggest you set the drop down's defaultselected value.

Set the drop down's Default:

If(Time(6,30,0)<=Now()&&Time(14,30,0)>Now(),"SHIFT1",Time(14,30,0)<=Now()&&Time(22,30,0)>Now(),"SHIFT2",SHIFT3")

The the drop down will be automatically filled in data according to time.

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
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

2 REPLIES 2
Highlighted
Community Support
Community Support

Hi @Phu_Le ,

Do you want to the drop down's selected value change according to time?

I'm afraid it's not supported to change the selected value directly.

As alternative way, I suggest you set the drop down's defaultselected value.

Set the drop down's Default:

If(Time(6,30,0)<=Now()&&Time(14,30,0)>Now(),"SHIFT1",Time(14,30,0)<=Now()&&Time(22,30,0)>Now(),"SHIFT2",SHIFT3")

The the drop down will be automatically filled in data according to time.

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
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

Highlighted

Thank @v-yutliu-msft 

So how to compare Datetimevalue like

If "18/05/2019 07:28 PM" + 11.5 hours > Now(), Then TRUE, Else FALSE

Thanks!

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,236)