[Solved] How to capture sguid in Hidden Value

0

Hi there, 

I have read your documentation on the sguid variable (http://help.surveygizmo.com/help/article/link/sguid-the-url-variable)

However, I do not find it clear how to actually capture the sguid in a hidden variable.

If not from a merge code (not listed here at all: http://help.surveygizmo.com/help/article/link/hidden-values), then how?

Thanks

richardharrison asked

    Best answer

    0

    If you need to capture the SGUID in a hidden value action, the best way I’ve found is just to use the merge code that captures a url variable.  I think the built in generic version of the merge code is this:

    [url(“xxx”)]

    You’d just want to replace the xxx with sguid, so it looks like this:

    [url(“sguid”)]

    That will simply pull the value of the SGUID into the hidden value action and store it there and hopefully that will solve the problem you’re running into with the API too.

    Chad Wilco answered
      0

      Aha thank you, Jacob!

      If SGUID is stored for every survey should I be able to see it in the SurveyResponse object from the REST API? So far the only way I have found of receiving SGUID in this object is to have set it on a hidden value.

      http://apihelp.surveygizmo.com/help/article/link/surveyresponse-returned-fields#getobject

      richardharrison answered
        • Hey Richard,
          I would have to rely on the support team for that question. I don;t have experience using the REST API.

        1

        Hi Richard,

        First off, SGUID is stored in every survey, even without a hidden value.

        You can use Custom Scripting to pull the SGUID from within the survey using the following:

        %%sguid = sgapiGetSGUID();

        If you still want to store it into a hidden action you can use the following custom scripting:

        sgapiSetValue(4,%%sguid); // Replace the “4” with the hidden value id

        Using both of these commands in a custom script action will first pull the SGUID and then store it in your hidden value.

        Documentation to check out:

        sgapiGetSGUID

        sgapiSetValue

        Jacob Hayslett answered
          ×

          Login

          Question stats

          • Active
          • Views2862 times
          • Answers3 answers
          • Followers0 followers