Re: [Dhis2-devs] Program rule for Age value type

2018-04-13 Thread Em Le Hong
Hi Edouard Lavaud, Thanks for your guide. Actually I want the system to show an error message if user enters value < 5 for the input field. It's very easy to check if we use value type is Number or Date (for Date of birth). But I really want to use Age value type because it's nice feature for

Re: [Dhis2-devs] Program rule for Age value type

2018-04-11 Thread Edouard Lavaud
Hi Em Le Hong, If I well understand: You capture the age at a different moment than you would like the program rule to be executed? If no, program rule executed on the same stage as you capture the age: To be checked (never used the age value type so far), but age should be an integer.

[Dhis2-devs] Program rule for Age value type

2018-04-11 Thread Em Le Hong
Dear all, I create a tracker data element value type: Age For event program, I want to use program to check and show error if Age is under 5 I tried 2 functions d2:yearsBetween; d2:daysBetween with the expression as below but it doesn't work: d2:daysBetween(#{age_value_type}, V{event_date})