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?
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:
You’d just want to replace the xxx with sguid, so it looks like this:
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.
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.
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: