Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

A means by which respondents can download on-the-fly Maxdiff results?

Has anyone any ideas about how best to enable respondents to download and keep their on-the-fly Maxdiff results?

I guess I could store them, give the user a unique ID code, and have them log into a site subsequently and download them, but that seems clunky.

I’d prefer to have them inserted into some template in real-time with a download possible at the end of the survey.

Ideally the download would include some generic  material on interpretation and then their specific scores.

The context is a (v9) study in which the results will be an incentive to participate, for a sample who are making a career decision related to the Maxdiff study.

asked Sep 8, 2016 by dan r Bronze (1,550 points)

1 Answer

0 votes
I've created a start at the code you'll want to use.  This creates a data.txt that stores the label and score of ten levels in the MaxDiff exericse.

<a href="" id="maxDiffScoresDownload" download="data.txt">Download</a>

var downloadText = '[% ListLabel(MaxDiffList, 1) %]: [% MaxDiffScore(MaxDiffExer, 1) %]\r\n';
downloadText += '[% ListLabel(MaxDiffList, 2) %]: [% MaxDiffScore(MaxDiffExer, 2) %]\r\n';
downloadText += '[% ListLabel(MaxDiffList, 3) %]: [% MaxDiffScore(MaxDiffExer, 3) %]\r\n';
downloadText += '[% ListLabel(MaxDiffList, 4) %]: [% MaxDiffScore(MaxDiffExer, 4) %]\r\n';
downloadText += '[% ListLabel(MaxDiffList, 5) %]: [% MaxDiffScore(MaxDiffExer, 5) %]\r\n';
downloadText += '[% ListLabel(MaxDiffList, 6) %]: [% MaxDiffScore(MaxDiffExer, 6) %]\r\n';
downloadText += '[% ListLabel(MaxDiffList, 7) %]: [% MaxDiffScore(MaxDiffExer, 7) %]\r\n';
downloadText += '[% ListLabel(MaxDiffList, 8) %]: [% MaxDiffScore(MaxDiffExer, 8) %]\r\n';
downloadText += '[% ListLabel(MaxDiffList, 9) %]: [% MaxDiffScore(MaxDiffExer, 9) %]\r\n';
downloadText += '[% ListLabel(MaxDiffList, 10) %]: [% MaxDiffScore(MaxDiffExer, 10) %]\r\n';

var data = 'text;charset=utf-8,' + encodeURIComponent(downloadText);
$('#maxDiffScoresDownload').attr('href', 'data:' + data);

"MaxDiffExer" should be replaced with the name of the exercise.  "MaxDiffList" should be replaced with the name of the exercise's list.
answered Sep 8, 2016 by Zachary Platinum Sawtooth Software, Inc. (79,700 points)
Thank you Zachary, that's a great start indeed.
More to follow, but with a delay - we were wondering whether to pitch this 'download and keep' idea within a study- your reply has confirmed we should include it.
You're welcome.

Quick note: please be sure to test this well in all browsers you need to support.  Different browsers may handle downloading differently.