Error using hasValue function to validate tracked entity attribute values

Hello everyone,

has anyone tried to use the d2:hasValue() function on validating tracked entity attributes? Apparently it shows me an error Expression is not valid and does not validate however it works well for data elements. Some one please advise. I am using v2.35.1.

Absolom

Hi Absolom,
I am not sure what is the use case for the syntax A{ENRL_DOB}, we are allowing only UIDs in this case, but if you use #{ENRL_DOB} it will work.

Hello there,
That’s fine thats showing error. It seems dhis tracking team about to make a change and hopefully soon will introduce the right way on how to form valid expressions. I met this error as soon as I migrated from 2.34 to 2.35.
So as long as it works don’t worry.
Maybe @phil can comment this?
Regards, Ulanbek

Hello @Unlabek, thank you for the feedback. I tested and the function doesn’t work.

AM

This is a known issue as reported here: https://jira.dhis2.org/browse/DHIS2-9854 The problem is that the attributes despite being documented as A{XXX} are not properly working. So using what @enrico suggest should work until it gets fixed.