none
Deduct Public Holiday through share-point designer workflow loop - Leave Managment

    Question

  • I find till the date no one has asked this question :P I tried to dig this forum lots but empty hand so finally i posted here so that every one including me get benefited.

    Dear Expert,
    I have two list 

    a) Holiday = date, Holiday Name
    b) Leave Request = Start date, end date, request day (Calculated column)

    Workflow in Leave Request and I am stuck here, below workflow not working as i expected. Any expert who can throw light on this would be great. Is lookup for date time : Find the list field correct ??

    Variable are as follows; 

    a) checkdate (date/time)
    b) enddate (date/time)
    c) requestday (number) as this is the calculated value
    d) Holiday (date/time)

    I have 10 public holiday date in holiday list.

    Above w/f check the holiday date from holiday and if match deduct -1 to request day.  But not working as it should i guess:( any suggestion???

    --updates--

    I changed  find the list item but still no output :(.  Hope this time i get help from the group.







    • Edited by cosmicwave Saturday, March 25, 2017 3:30 AM update
    Saturday, March 25, 2017 1:28 AM

Answers

  • You will need to change field "RequestDay" to Number and not calculated field and remove it from Forms by making it hidden. Workflow will look like this. It in addition to holidays also checks for Saturday and Sunday.

    • Marked as answer by cosmicwave Saturday, March 25, 2017 10:56 AM
    Saturday, March 25, 2017 3:24 AM

All replies

  • You will need to change field "RequestDay" to Number and not calculated field and remove it from Forms by making it hidden. Workflow will look like this. It in addition to holidays also checks for Saturday and Sunday.

    • Marked as answer by cosmicwave Saturday, March 25, 2017 10:56 AM
    Saturday, March 25, 2017 3:24 AM
  • Hi, once again thank you for your replied.
    I tried like  you but my output did not come as desired. 

    Kindly check screen shot; where i did wrong?

    I do changed requested field to number and not calculated...

    I choosed 25 t0 31st date
    1)  25 - sat
    2) 26 - sun
    3) 27 - mon
    4) 28 - tue  (holiday)
    5) 29 - wed
    6) 30 - thu   (holiday)
    7) 31 - fri   (holiday)

    7 - 2(sat/sunday) - 3(holiday) = 2   but i got 4 days from above workflow



    • Edited by cosmicwave Saturday, March 25, 2017 8:09 AM
    Saturday, March 25, 2017 7:46 AM
  • I found my mistake: variable longdate return field was string - which i changed to longdate. also there should be comma  find - in field. Finally problem solved

    Thanks a lot alokegupta for your help.


    • Edited by cosmicwave Saturday, March 25, 2017 10:55 AM
    Saturday, March 25, 2017 10:54 AM