Hi all,
I''ve a collection in my app where I've Items that hits all records that have a startdate of today OR have an enddate/time today. That's working fine.
Now I want to filter this collection in my gallery as follow:
If start time is between 8.00 and 8.59 it should be showed (works fine)
If end time is 8.00 > it should not showed (Works fine)
If end time is for example 8.30 > it should be showed, this is NOT working.
I've the following filter on my gallery:
Filter(Tasks.AllItems,Hour('Startdate (startdate)') = 8 Or Hour('Startdate (startdate)')<=8,Hour('Enddate (enddate)') >8 And Minute('Enddate (enddate)')>1 Or Hour('Startdate (startdate)')<=8,Hour('Enddate (enddate)')>8 ))
Anyone an idea how to achieve this?
Solved! Go to Solution.
I just figured it out by myself.
The correct filter is:
Hour('Startdate (Startdate)') = 8 Or Hour('Startdate (Startdate)') <= 8,
Hour('Enddate (enddate)') > 8 And Minute('Enddate (enddate)') > 1 Or Hour('Startdate (Startdate)') <= 8,
Hour('Enddate (enddate)') > 8 Or Hour('Startdate (Startdate)') <= 8,
Hour('Enddate (enddate)') >= 8 And Minute('Enddate (enddate)') >= 1 Or Hour('Startdate (Startdate)') = 8,
Hour('Enddate (enddate)') >= 8
Hi @dennisb88 ,
Is it because of the extra round bracket in the end. Try below code if it helps in your case.
Filter(Tasks.AllItems,Hour('Startdate (startdate)') = 8 Or
Hour('Startdate (startdate)')<=8,Hour('Enddate (enddate)') >8 And
Minute('Enddate (enddate)')>1 Or
Hour('Startdate (startdate)')<=8,Hour('Enddate (enddate)')>8 )
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.
Hi @PG_WorXz10 ,
Thank you for your reply.
Sorry the bracket was a typo from me.
What is not working now, is still the case that I want also show items that start for example at 7.30 end ends at 8.30. That item is not showed up at the moment.
I think it's something in my filter, but I don't know how to show it.
Does you know how to add that specific part to my formula?
Regards,
Dennis.
I just figured it out by myself.
The correct filter is:
Hour('Startdate (Startdate)') = 8 Or Hour('Startdate (Startdate)') <= 8,
Hour('Enddate (enddate)') > 8 And Minute('Enddate (enddate)') > 1 Or Hour('Startdate (Startdate)') <= 8,
Hour('Enddate (enddate)') > 8 Or Hour('Startdate (Startdate)') <= 8,
Hour('Enddate (enddate)') >= 8 And Minute('Enddate (enddate)') >= 1 Or Hour('Startdate (Startdate)') = 8,
Hour('Enddate (enddate)') >= 8