Community

Connect with us and enhance your M-Files experience using Unitfly Toolkit for M-Files. Here’s how to get started.

Notifications
Clear all

Extended Auto Properties - calculate Vacation days

0
Topic starter

Hi Everyone,

So i tried replicating this use case on our environment - https://toolkitformfiles.unitfly.com/documentation/extended-auto-properties-use-cases/

But what I noticed is that DATEDIFF is missing either first or last day, like the calculation of days starts from 0, not 1.

 

Meaning that the person requesting Vacation, should be using 5 days, which is the case here. I tried adding +1 day in Property Value Field but does not seem to work. 

image

 

image

I'm curious if this is something that can be fixed or changed? Thanks!

1 Answer
0
Topic starter

i fixed this by adding +1 with this statement: <<SUM('<<DATEDIFF('%PROPERTY_{PD.StartDate}%','%PROPERTY_{PD.EndDate}%','DAYS')>>','1')>> but it would be good to add a feature which checks this. This plus one then calculates 6 days if user selected from Sunday to Sunday value, taking this +1 into consideration.

Answer

WATCH THE WEBINAR

Introducing AI Document Kit: Add-on for AI-driven Document Management