[Solved] Populating hidden variables based on system info

0

I am trying to figure out a way to automatically populate a hidden variable in a survey based on the date the survey was taken. I know how to add the hidden variable for date and day of the week, but I would like for the survey to automatically populate a third hidden variable with a “Yes” or “No” response based on the date in an if “Date” then “Yes” else “No”.

This survey is used as an email capture form and is used to generate the email campaign for a longer questionnaire sent later in the week, and was looking for a streamlined way to get this information into the campaign data for question logic in the main survey. Currently, we are generating that variable manually in Excel, and just trying to take out steps.

I feel like this is a Java is the answer, but no one on my team has experience with it.

Any suggestions would be lovely,

Cheers, 

Gretchen

Gretchen Haupt8488 asked

    Best answer

    0

    Hi Gretchen,

    In general, you are correct that populating a value based upon some other value will require scripting to achieve. SurveyGizmo allows for both regular Javascript (different from Java), as well as our own “Custom Scripting” language which is based upon PHP.

    Sometimes though, it is possible to get creative with the built-in features of SurveyGizmo. I am afraid I did not quite understand this portion of your question — if you do not mind clarifying this, I may be able to offer a better suggestion that does not require any scripting :)

    I would like for the survey to automatically populate a third hidden variable with a “Yes” or “No” response based on the date in an if “Date” then “Yes” else “No”.

    Nathan - Survey Astronaut answered
      • Thanks!

        Right now, I’m using a hidden variable in an email collection form that is based on System Data to populate the Day of the week the email is collected and the Date (dd/mm/yyyy).  The email collection form is used to populate a campaign (we just download the results, then upload and map fields) for the actual survey, and we use the hidden variables for custom fields in the campaign for survey logic.

        I would like to add a third variable or question that is automatically populated with a “Yes” or “No” response based on the Date the emil was collected. For example, if the email was collected on 12/24/2015, the hidden variable would be populated with the text “YES” and if the email was collected on 12/23/2015, the hidden variable would be populated with the text “NO.”

        I hope that adds clarity.

        Gretchen

      • Hi Gretchen, thanks for your comment, and I apologize for the delay in responding. Based upon the additional information you’ve provided, it does seem that this behavior would require some kind of custom scripting to achieve :( This resource may be helpful for you, depending on your budget for this survey:
        http://help.surveygizmo.com/help/article/link/friends-of-surveygizmo-referral-program

      ×

      Login

      Question stats

      • Active
      • Views938 times
      • Answers1 answer
      • Followers0 followers