Good morning community
I am trying to add a csv file via media, then use pulldata(). In that csv file, i have one variable named child_birth_date. Actualy we want to do a data collection and i want to capture the age in months of children the days of data collection, I mean Today(the day of data collection)-child_birth_date . To do it in the first time, I called child_birth_date using calculation type in pulldata(…). To find age in months, I used the that previous variable using calculation type with that formula: int((today() - date(${child_birth_date})) div 30.4375) but i got error message when deploying the form :
ODK Validate Errors: >> Something broke the parser. Error evaluating field 'ageinmonths_calc' (${ageinmonths_calc}[1]): The problem was located in Calculate expression for ${ageinmonths_calc} XPath evaluation: type mismatch The value "child_details" can't be converted to a date. Caused by: org.javarosa.xpath.XPathTypeMismatchException: The problem was located in Calculate expression for ${ageinmonths_calc} XPath evaluation: type mismatch The value "child_details" can't be converted to a date. ... 10 more The following files failed validation: ${tmp0c391f29} Result: Invalid
After that, I tried to call child_birth_date by date type, then in calculation I used pulldata(…). To find ageinmonths i used int((today() - ${child_birth_date}) div 30.4375). I deployed the form but when trying the form after downloding the data, the column of ageinmonths was empty.
How can I solve that issue?
