Dear Collegues,
I am trying to validate a field (a registration number) using a regular expression for TEIs enrolled in a given programme on or after a specific date i.e. I will not do this for those registered on or after a given period (as there’s so much back log to deal with, including correction of paper-based records if i attempt to apply the validation on all TEIs - previous and new). The program rules works fine without date condition in the program rule expression;
d2:hasValue('someID') && !d2:validatePattern(A{SomeID},'[0-9]{3}[A-Z]{3}[0-9]{2}')
However, if I and the enrolment date to have this applied to only newly registered TEIs on or after 1st Nov 2019, it fails. See below;
d2:hasValue('someID') && !d2:validatePattern(A{someID},'[0-9]{3}[A-Z]{3}[0-9]{2}') && V{enrollment_date} >= '2019-11-01'
I’ve been scratching my head around and wondering what wrong am doing.
I’m probably missing something…