Search by age of customer

0
I have a list screen which displays a list of customers. On the customer entity there is a 'Date of Birth' field. I need to be able to search on customers by using an Age field, e.g. Age greater than 8 and less than 12. The Age field is not stored on the entity as it will change with time. How can I do this?
asked
1 answers
1

If you need to search, the easiest option would be to have an age attribute which you update daily. If you just need to display specific ages, you could use XPath, take a look here for tokens like [%YearLength%].

You XPath constraint would look something like (note that I did not validate the syntax):

 [DateOfBirth < ['[%BeginOfCurrentDay%] - 8 * [%YearLength]']]
 [DateOfBirth > ['[%BeginOfCurrentDay%] - 12 * [%YearLength]']]
answered