Hi,
We have a survey where users enter a start date, and we have javascript on this start date field that populates a hidden/embedded data field called endDate (yes we realized after the fact that we used the qualtrics core metadata field name, this is not causing issues with the code). We then pipe text the start and end date into subsequent questions/fields in the survey for the user to report on this specific date range. We have 6 responses so far, and 5/6 have failed to calculate the endDate and the endDate is appearing to the users and being saved in the data as "NaN/NaN/NaN". We realized that browser type/version may be playing a role in how the javascript executes, so have since included UserAgent as an embedded data field to capture this additional information for new records in the meantime, while we try to resolve the issue with endDate not populating correctly.
Anyone else in the community have any insight or additional suggestions on troubleshooting this issue further?
Thank you!
Rebecca
Solved
Javascript error/calculation fail NaN/NaN/NaN
Best answer by rprice
Thank you again! We have done some more testing and learned that the NaN error is thrown when taking the survey in IE, firefox, or safari, but it works fine/does not throw error in Chrome/Edge. Any additional thoughts/input there? Seems like it is related to javascript not playing nicely with certain browsers..
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.