Millisecond Forums

Webscript terminates immediately on launch; issue with URL query?

https://forums.millisecond.com/Topic32345.aspx

By Jack S. - 10/14/2021

I'm having some issues with a webscript. My experiment uses a Qualtrics survey with a link to the Inquisit webscript, and a URL parameter to pass the Qualtrics ResponseID along as the Inquisit participant ID. However, when I try to launch the experiment using the link from Qualtrics, the experiment ends immediately after all materials are loaded and displays the finish page. Oddly, when I manually input a numeric ResponseID, the experiment works fine; it's only when a Qualtrics-type alphanumeric ID gets passed along that it fails. The webscript log shows no errors, but no data is recorded either. I was able to run an almost identical script (same URL parameters and everything) with no issues earlier this month. Any idea what might be going on here?

For reference, the URL embedded in my Qualtrics is mili2nd.co/fc4b?ResponseID=${e://Field/ResponseID}

In my webscript settings, participant IDs are set to be generated via "QueryParameter", and the parameter is named ResponseID

By way of example, launching the webscript from this link (with a numeric ID) seems to work:
https://mili2nd.co/fc4b?ResponseID=8675309

But launching from this one (with a Qualtrics-style ID) does not:
https://mili2nd.co/fc4b?ResponseID=R_3ilfHDvW84FI8GT

Any suggestions would be greatly appreciated! Please let me know if you'd like additional information.
By Dave - 10/15/2021

Jack S. - 10/15/2021
I'm having some issues with a webscript. My experiment uses a Qualtrics survey with a link to the Inquisit webscript, and a URL parameter to pass the Qualtrics ResponseID along as the Inquisit participant ID. However, when I try to launch the experiment using the link from Qualtrics, the experiment ends immediately after all materials are loaded and displays the finish page. Oddly, when I manually input a numeric ResponseID, the experiment works fine; it's only when a Qualtrics-type alphanumeric ID gets passed along that it fails. The webscript log shows no errors, but no data is recorded either. I was able to run an almost identical script (same URL parameters and everything) with no issues earlier this month. Any idea what might be going on here?

For reference, the URL embedded in my Qualtrics is mili2nd.co/fc4b?ResponseID=${e://Field/ResponseID}

In my webscript settings, participant IDs are set to be generated via "QueryParameter", and the parameter is named ResponseID

By way of example, launching the webscript from this link (with a numeric ID) seems to work:
https://mili2nd.co/fc4b?ResponseID=8675309

But launching from this one (with a Qualtrics-style ID) does not:
https://mili2nd.co/fc4b?ResponseID=R_3ilfHDvW84FI8GT

Any suggestions would be greatly appreciated! Please let me know if you'd like additional information.

Your script *expects* numerical subject IDs for condition assignment per



Condition assignment is a mathematical operation, i.e. if the subject ID is not numerical, no condition can be assigned and hence nothing can be run.

The solution is to change the way conditions are assigned, i.e. use the group number: https://www.millisecond.com/support/docs/v5/html/language/attributes/groupassignment.htm

<expt giving_left_accept>    
/ subjects = (1 of 2)
/ groupassignment = groupnumber

/ preinstructions = (giving_intro_1, giving_intro_2)
/ blocks = [ 1 = assignment; 2 = vignettes_left_accept]
/ postinstructions = (outro)
</expt>

<expt giving_right_accept>
/ subjects = (2 of 2)
/ groupassignment = groupnumber

/ preinstructions = (giving_intro_1, giving_intro_2)
/ blocks = [ 1 = assignment; 2 = vignettes_right_accept]
/ postinstructions = (outro)
</expt>
By Jack S. - 10/15/2021

That did the trick -- thank you so much for your help!