Post

2 followers Follow
0
Avatar

IsResourceAvailableForGivenPeriod

Hello,
I am using "IsResourceAvailableForGivenPeriod" function in a Task Work Flow Rule (see attachment) but does not get the expected result:
1. When there is no additional task within the date range the WF if working as expected.
2. When there is an additional task within the date range, were each day set to 1 hour (1 Day = 9 Hours) , the WF does not working as expected, i.e get into the 4 section of the WF that set the Units to 0.
I do not understand the logic of the formula because the resource is not loaded, so i expected to get the Units set to 0.5 hours (section 3).

Regards,
Asaf Bahir


Asaf Bahir Answered

Please sign in to leave a comment.

4 comments

1
Avatar

Hi Asaf,

 

I've tested the function and it is working as expected, basically if the user (in your case targetobject) is free for the entire period it return true otherwise false.

I suggest the following steps:

1. Narrow down the problem. Write a Custom Action a simple that checks the availability and make sure it works exactly as you would expect (e.g. CA on user object with startdate and enddate as variables - make sure you user GetStartWorkDay() and GetEndWorkDay() on the dates respectively).

2. Write the CA on WorkItem that instead of changing the units field you pop a notification (there's a a Notify action) - it will allow you to debug it better.

3. Write the WR after all the lessons learned from the previous examples.

 

If you still don't get the expected result, join one of our weekly Advanced Configuration Office Hours and one of our experts will love to assist.

 

 

Good luck!

Tamir

Tamir Avital 1 vote
Comment actions Permalink
0
Avatar

Hi Tamir,

I tried your suggestion on an User object and it worked !!!

But my WF has to be written on a task object, and by now i cannot get the expected results as i mentioned in my previous mail.

Is this function can be modify in a task object ?

Asaf

Asaf Bahir 0 votes
Comment actions Permalink
0
Avatar

Hi Asaf,

 

The function is available in the context of a task workflow rule, if you are not successful in implementing it I would kindly suggest one of Office Hours webinars so we can better support you.

 

Good luck!

Tamir

 

Tamir Avital 0 votes
Comment actions Permalink
0
Avatar

Hi Tamir,

I would like to thank you for your assistance with my issue !

The problem detected in the “Set Evaluation Criteria” section.

This time I set it up correctly and the WF works as expected !!!

 

Regards,

Asaf

Asaf Bahir 0 votes
Comment actions Permalink