How to retrieve list of employee whose joining date is one,five and ten year before

0
Hi all I have a list of employees with there joining date. I want to retrieve list of employees whose joining date fall’s under next month. For example current month is May so I want to retrieve all the employees whose joining date is between 1 june to 30 June and so on but only those employee who joined company one year before, 5 year before and 10 year before. Basically want to retrieve employee whose work anniversary is in next month but who will complete 1 year,5 year and 10 year in next month(month if current month is May then employee from month of June , if current month is June then from July and so on). Can anyone tell me how do I write xpath or condition for this.   Thanks in advanced
asked
1 answers
1

Hi Priyanka,

 

You can use 2 methods:

  1. Create variable prior to the retrieve activity and use that in your XPath
    i.e.
    [JoinDate >= $MonthStartValue]
    [JoinDate < $MonthEndValue]

     

  2. Alternatively, you can use XPath tokens or keyword (see XPath Keywords and System Variables | Mendix Documentation). In this case your XPath would look something like this:

    [JoinDate >= '[%BeginOfCurrentMonth%] + 1 * [%MonthLength%]']
    [JoinDate < '[%EndOfCurrentMonth%] + 1 * [%MonthLength%]']

     

answered