XPath constraint on object retrieval

1
I am trying to constrain my list of objects retrieved from the DB using Xpath the following( basically give me only the ones that have EoSM more than year from now.  When I try this synatax [EoSM >= '[%YearLength%]'] it says invalid token type. When I try this, [EoSM >= '%YearLength%'].  No errors but it doesn’t work. It doesn’t show any errors and when I execute, I don’t get any objects that meet this criteria (where as there are several that meet this criteria. Mendix Xpath doc says, we could use this token. 
asked
3 answers
4

You need to do a comparison on a specific date + yearlength.

Thus something like this: [EoSM >= ('[%CurrentDateTime%] + [%YearLength%]')]

answered
0

Try [EoSM>=addYears([%CurrentDateTime%],1)] I think it should work fine.

answered
0

Thanks I will try these out.

answered