This content describes Snap 11. For Snap 10, the equivalent page will be in Snap 10 help

Previous Topic

Next Topic

Book Contents

Book Index

Passing information to the updatesurvey.asp page

If you are using a Snap installation of Snap WebHost, use the link https://www.snapsurveys.com/wh/ (or https://wh.snapsurveys.com/).  If you are using a non-Snap installation of Snap WebHost, replace www.snapsurveys.com (or wh.snapsurveys.com) with the path location of your Snap WebHost server.

You can pass information to the updatesurvey.asp page as a URL to update the respondent database in Snap WebHost.

You do this in the same way as using a survey link to seed data into the survey.

Information can be passed as parameter value pairs using http GET and Post methods. The examples below describe the use in GET. For further information about http methods, see a reference site such as http://www.w3.org/2001/tag/doc/whenToUseGet.html

You use:

Note that the address of the Snap updatesurvey.asp pages are different depending whether you wish to communicate with Snap WebHost for Snap 10 (https://www.snapsurveys.com/swh/updatesurvey.asp) or Snap WebHost for Snap 11 (https://www.snapsurveys.com/wh/updatesurvey.asp)

https://www.snapsurveys.com/wh/updatesurvey.asp
?k=surveyid&updatename=value

If you wish to set more than one item, repeat the & and then have another instruction.

https://www.snapsurveys.com/wh/updatesurvey.asp
?k=surveyid&updatename1=value1
&updatename2=value2&updatename3=value3

If you wish to clear the value of an item, omit the value field.

https://www.snapsurveys.com/wh/updatesurvey.asp
?k=surveyid&updatename=

or with multiple items

https://www.snapsurveys.com/wh/updatesurvey.asp
?k=surveyid&updatename1=&updatename2=value2

If you do not set or clear an item, it will keep its existing value.

Do not have any line breaks or spaces in your command. These have only been put in here because of space limitations

Because you are dealing with an asp page, you cannot use characters that have special meanings within the value strings. For example, if you set something to a value containing an &, updatesurvey.asp would assume that the & character meant that it must set a new variable. If you need to represent these characters, you must use percent-encoding. Replace the character on the top row with the three character code on the bottom row.

Character
Code

!
%21

*
%2A

"
%22

'
%27

(
%28

)
%29

;
%3B

Character
Code

:
%3A

@
%40

=
%3D

+
%2B

$
%24

,
%2C

/
%2F

Character
Code

?
%3F

%
%25

#
%23

[
%5B

]
%5D

space
%20

&
%26

Items to set via updatesurvey.asp

Parameter

Description

Req

Example

Equivalent field on the updatesurvey page

a

Specify action to take: one of add, update or delete

Yes

&a=delete

Action

k

Supply the survey k number

Yes

 

Survey k-number

kp

Supply the survey password

(If enabled)

 

Survey password

u

Set the respondent's username

Yes

 

Username

p

Set the respondent's password

(If used)

 

User password

e

Set the respondent's email address

 

&e=info%40snapsurveys.com (for the email address [email protected])

User email address

m

Set up any user-specific data used in email invitations in the format name=value

 

&m=name%3DJames%26company%3Dsnap

to set the email variables {name} and {company}
in the format name=James&company=snap

User email data

s

Set up all user-specific data that has been seeded into the survey

 

&s=Q1%3D10%26Q3%3Dfred to set the survey variables {Q1} and {Q3} in the format Q1=10&Q3=fred

User seeding data

Set up web page to go to on completing the action

 

ok

go to this page if the action succeeded

No

&ok=http%3A%2F%2Fwww.snapsurveys.com

If the action succeeds

er

go to this page if the action failed

No

&er=http%3A%2F%2Fwww.thereWasAnError.com

If the action fails

em

go to this page if the action fails and append the generated error message to the URL (for example, to store it in a database)

No

&em=http%3A%2F%2Fwww.saveThisError.com%2Ferrors%3Fappend%3D

If the actions fails (the error message is appended to the URL)

Note that if you are passing information to a password-protected survey, the password will be visible if it is passed within a URL that is seen by the user.

Microsoft limitations on passing the command as a URL or link

Microsoft Internet Explorer has a maximum uniform resource locator (URL) length of 2,083 characters. Internet Explorer also has a maximum path length of 2,048 characters. This limit applies to the URLs for POST requests and GET requests. See: http://support.microsoft.com/kb/208427

See Also

Enabling respondent updates online

Testing changes by hand on the updatesurvey.asp

Example of adding a new respondent with email data

Example of updating an existing respondent with seeded survey data

Troubleshooting problems with updatesurvey.asp

Automatic managing of respondents for group surveys