Hi all,
I have a tracked attribute age in years and I would like users to enter a number greater than zero and less than 100.
Can anyone help me?
Thanks
Hi all,
I have a tracked attribute age in years and I would like users to enter a number greater than zero and less than 100.
Can anyone help me?
Thanks
Hi @fernandoshake,
You’d need to create a program rule with the expression d2:hasValue(#{ageinyears}) > 0 && d2:hasValue(#{ageinyears}) < 100
and then the action is to show error.
You can watch the Program Rules session below to learn more about the program rules:
Good luck!
That’s because the A{Idade do participante} is TEXT so you need to change it to a number value probably a positive integer.
It’s working here:
If you please clear the browser cache, try in incognito and then see again if it’s working or not.
If it’s not working after clearing the cache and trying in incognito please share the configuration of the attribute and the variable as well as what DHIS2 version are you using.
Thanks!
@fernandoshake did it work? Thanks!