Calendar entries comparison issues

  • 21 August 2017
  • 3 replies
  • 2 views

Badge +1

Hi

I have an entry in a calender and I need to check if this already exists.

The existing entry is 01/08/2017 13:00 - 02/08/2017 14:00
The new entry is 02/08/2017 15:00 - 03/08/2017 20:00(same day different time)

In the workflow a 'Set a condition' action is used for comparing.

ExistingEndTime < NewStartTime, but I get the wrong result. In the above example its should be TRUE but its resulting as FALSE.
However If I advance the new entry start point by a few hours to 02/08/2017 20:00 then the condition returns TRUE, which I cant understand.

 

I've read on blog that time conditions do not work time related fields ?

Thanks


3 replies

Userlevel 5
Badge +14

can you clarify what exactly do you compare?

item properties or workflow variables or mix?

are they of datetime type, or some strings?

do you perform any calculations on dates before comparison?

can the timezone shift be a problem? can dates be input in different zones?

have you tried to use one of dateDiffXXX functions?

Badge +1

Hi

I've tried another test and still getting the wrong result. I'm working within the same site. All columns ate time / date format

I've created a request list and a Calendar. The wf runs on Request List and makes a comparison against any entries in the Calendar and a  clash is reported.

In the Calendar I have an entry 9.00 - 15:00

In my Request List I have an entry 5:00 -6:00

However the condition results in true ( clash occured) when it shouldnt.

Calendar entry:
Start Time 25/10/2017 09:00 
End Time 25/10/2017 15:00 

Request List:

Visit Start 25/10/2017 02:00

Visit end 25/10/2017 03:00

When the WF is executed, the 'span across the requested window' condition returns true. If the request list date is changed to one date prior,all the conditions return false. It appears that the time element is not being considered?

Please seescreenshots of wf.

overview

start during the requested window

end during the requested window

start during the requested window:start during the requested window

span across the requested window

span across the requested window

Userlevel 5
Badge +14
It appears that the time element is not being considered?

yes, exactly.

CAML by default doesn't consider time until explicitly specified it should do so.

see this post - https://community.nintex.com/message/55080-re-when-filter-data-from-a-sharepoint-list-on-modified-has-anyone-had-a-probl… 

Reply