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
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..
Sign up
Already have an account? Login
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login to the Community
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

