Hi everyone,
I'm updating a database (originally created in FMP5)New HR.fmp12.zip for our HR Manager and not having a lot of success with a couple of calculations.
In the attached file (Username = Manager, password = pass), the main layout is "Employee Info".
The calculation for Years with firm is presently "If(Work Status ="Active";(Today-Date of Hire)/365;0". This gives a rough length of employment but isn't accurate due to leap years. Nor does it provide a calculation for Inactive employees. I would like to give the result as 4 years 3 months - days aren't necessary. For Active employees the calculation should be today - Date of Hire, and for Inactive employees it should be Date of Termination - Date of Hire.
The second calculation is for the various types of Leave: Sick, Vacation, Leave Without Pay and Other. I have set it up that the previous years' vacation etc is set up to archive manually once a year (around NewYear). The Archive field is set to "No" upon record creation. So the calculation for reporting should be based on Archive = "No". The two fields that need the calculation are Remaining Vacation and Vacation Days Used. This is what I have tried for Vacation Days Used, but it is still totalling both archived and unarchived records: If(Vacation::Archive="No";Sum ( Vacation::Vacation Length );0).
Many thanks for your assistance.
Skiffy