Possible to direct participants to a question block based on date of birth given? | XM Community
Skip to main content

Hello,
I was wondering is it is possible to do something like this in qualtrics.
We require parents to answer a specific question block based on their child's age in month and days. Right now we have four multiple choices for parents to select from, which would direct them to the correct block.
However, this leaves room for error, and so was wondering if it would be possible for parents to give their child's date of birth, and this to automatically calculate child age in months & days, which would then send them to the correct block?
Many thanks for your help!

Have you checked out Branching Logic in the Survey Flow? You could have x number of branches with conditionals for what the parents select in your multiple choice question that would take your respondents to different blocks, no math required.


Hi Jeremy,
Thank you for your quick reply! Right now we are using branching logic so that parents choose a specific category (child age in months & days).
However, we foresee this might cause issues if a parent incorrectly calculates their child's age, and so were wondering if it was possible within Qualtrics to ask parents their child's DOB, which could then be used to calculate age in months & days automatically, and direct them to the correct questionnaire?
Thanks


Agreed, that leaves the door open for parents to miscalculate, throwing off your data. What about this:
Textbox question asking for child's DOB, with validation on textbox for DOB. Add JavaScript that does the calculation (something like this) and sets the age of the child to an embedded Data field. You can then drive your branch logic off that embedded data field's value.


Ah thank you that looks like a really good solution - I will try that out today 😊


Hi! TSharp I'm also trying to do something similar for my project, but I am new to using Javascript and embedded data in Qualtrics. If you don't mind, can you share screenshots of what worked for you (survey flow, javascript)? I was able to follow JeremyK's suggestion up to the part about adding JavaScript, but I am kind of lost thereafter. Thanks in advance!


Leave a Reply