- The questionnaire constructs a Date/Time variable from year/month/day components from Numeric questions.
- It then uses this variable in another variable which calculates the difference between this date and another Date/Time question.
- if the components in 1) are received from interviewer questions: works perfectly
- if the components in 1) are preloaded for hidden questions
– works fine on tablet Interviewer
– does not calculate the date difference if run on the web Interviewer interface! (It does show the Date/Time variable correctly in static text though).
It took me quite some time to look for any wrong doing on my side before finally deciding to test it on the tablet.
Please recreate this situation using a minimal questionnaire on the demo server and share the assignment ID.
I’ll do that as soon as the demo server is accessible again.
I tested such a minimal qx on my pds. If you want I can give you access to it.
The demo server remained accessible, but the password for a specific HQ-account was changed by one of the users, which has caused inconvenience to the public.
This account’s password has been restored and is currently as published in the demo-site description.
As a reminder:
do not use the public demo server for collection of any real data!
do not change the published credentials of the HQ-account!
@klaus , please replicate your example so that this issue in the start of this thread can be inspected.
Thank you, Sergiy
I have now imported the minimal test questionnaire “forum test” on the demo server
and created assignment 1224827, preloading the two hidden questions:
After entering a birthdate, the variable age should show the date difference (as it correctly does on a tablet), but in the interviewer web interface it doesn’t.
I confirm that I could replicate your reported issue and entered the defect into the issues tracker
You can follow the status of this issue in github.
I am not aware of any specific reasons for this occurring nor any specific workaround for this issue that is readily available.
Not related to the above:
If the example is a cutdown version of the real survey questionnaire, please check the filtering conditions for the date selectors, as currently it allows entering 1991-02-29, which is not a valid date.
thank you very much for reporting this issue.
My colleague has diagnosed that it is related to the use of DateTime-typed variables in expressions, and not to preloading.
A fix for the issue is going to be included in the next version of Survey Solutions.
In the meanwhile you can avoid creating a variable of DateTime type and use its expression instead of its current occurrences.
For displaying the date (if this is needed) - create a string variable, which you can display without running into this problem.
Thank you @sergiy, the important thing is that works correctly on the tablet for the actual survey.
I did my tests in the web interviewer, but I can also do them on a tablet.
The same issue may also be encountered on the tablets under some scenarios. So it is important to update once the new version comes out.
Users that don’t have variables of type DateTime in their questionnaires are not affected by this issue.