adding attendance plans by seniority

I am new to complex expression and functions

My client has attendance plans that employees are eligible for based on 

belonging to a certain group (I have used Pe.p_level3 to identify the 2 groups) 

PLUS

Either years of service >= X or salary range >= x and < y

I have tried as a criteria table with YEARSSENIORITY() , as a criteria builder with Job service in Months and neither are working. 

How would you accomplish this?

For example 

those who work 7-day weeks and have either  over 25 years of seniority or make more than 30450 annually get 35 days vacation

those who work 5-day weeks and have either over 25 years of seniority or make more than 30450 annually get 25 days vacation

  • 0

    Sorry, but where are you seeing that there is an expression builder for a Time Off Attendance Plan like there is for a Benefit Insurance Plan. Are you setting this up outside of the Attendance product/module? 

    It sounds like you are setting this up as an Insurance Plan in the HR product which will calculate a dollar amount not hours. I don't recognize "YEARSSENIORITY()" as valid foxpro syntax for the expression builder. In a criteria table you would have Pe.p_level3 in one of your columns and a syntax in another column to get the difference between today's date and the seniority date. I think the syntax would be something like: STR(YEAR(DATE())))-TtoD(PE.P_SENDATE))/365.25)  . In the rate table you would put in the values for years, pe.p_level3 and rate.

    The point is that this is for a rate, not hours, but being an HR system it is more open ended and you can use it however you want. The software has the Attendance product to setup accruals. My recommendation would be to setup two different attendance plans, one for the 7-day and another for the 5-day. Truthfully, the Attendance product is a bit limiting since there is no options for expressions nor can you Automatically Add to Eligible Employees. A good option would be to use the Pe.p_level3 value to identify the employees when using the Add Attendance Plans Process in the Attendance/TimeOff product. 

  • 0 in reply to angel g

    It is an attendance plan not a benefit plan.

    When I use Add Attendance Plans I can select a criteria table where set up the expression.

    thanks

  • 0 in reply to DBREEN

    ok got cha, you are using the criteria plan when adding the plan to the employees. Maybe use something like: Pe.p_level3="value" and (Date()-TtoD(Pe.p_sendate))/365>=25 and Pe.p_annual>=30450