Millisecond Forums

ID Number length

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

By cgshield - 2/21/2014

We have a 2-month license, so I don't want to start the clock ticking until I am absolutely ready to go.  

So, can anyone answer how long an ID number can be?  We are having participants routed from Qualtrics to IAT, but they will need to input (copy and paste) their ID number that was supplied to them by Qualtrics in the first field of the IAT on Milliseconds so we can link up the two pieces of data.  The ID number provided by Qualtrics is a little long, do you think it would work?  It appears to be 17 characters:  R_b7xEoy1vgBr4qdT


By Dave - 2/21/2014

The length of the ID is not a problem. However, you should consider passing said ID in via an URL query parameter instead of having people manually copy / paste it (too error prone). You will find use of query parameters covered in the "How to Interoperate Inquisit Web with Online Survey Packages" topic in the Inquisit documentation.

On the Qualtrics-side, query parameters are handled under the term "embedded data". Details, I'm sure, are available in the Qualtrics documentation or via their other dedicated support options.
By cgshield - 2/21/2014

Thanks! 

I'll look into it, I have been trying to figure out how to link them to the Milliseconds page but by using the specific ID so we can actually link the two separate pieces of data, and I just don't know enough about Qualtrics or Milliseconds to feel totally comfortable that I am doing it correctly.  Honestly, on Qualtrics I could only find a way to insert the Response ID as part of the end of survey.  If I had it redirect to the Milliseconds URL it appears as though it is not customizable to include the ID in that transition from one to the other.


I'll see if our campus provides one-on-one meetings with someone that knows Qualtrics though. Thanks!

By Dave - 2/21/2014

I can assure you that Qualtrics can pass its ID via query parameter just fine -- people do it all the time.

For starters see https://qualtrics.com/university/researchsuite/developer-tools/api-integration/passing-information-through-query-strings/ and https://qualtrics.com/university/researchsuite/advanced-building/survey-flow/embedded-data/
By cgshield - 2/21/2014

WOW, I think that worked!  I would have never found that help page because I wouldn't have been searching for "API Integration" haha

There was not a lot of customization options where it says "Link participant to another URL" and I didn't see anywhere to embed data (or the piped text) so I assumed I couldn't do it.  I didn't know you just typed the "piped" text at the end of the URL.

It appears to have worked, the URL looks like this once I finished taking the survey:

"http://research.millisecond.com/cgshield/Painiatshort.web?ID=R_9YLwyBqhxAIQEtL"

Do you agree that it appears to have worked?  I'm just so nervous that I'll end up with a bunch of data and no way to link the two pieces together (and alas no Master's Thesis will be written)

I'll have to test once I start my 2-month license, but I want to be as close as possible to "ready" before I start my license.  THANKS- you deserve a raise ;)
By Dave - 2/21/2014

> Do you agree that it appears to have worked?

Looks fine to me.
By cgshield - 2/21/2014

Ok Dave, one more challenge for you then!

After they complete the whole deal (Qualtrics and Milliseconds) I want to send them back to a NEW Qualtrics survey where they can fill out their personal information to receive a giftcard.  Understandably, I do not want their Response ID attached to this because I want their name to be completely separate from their previous responses.

I know that I can just put the URL for the new Qualtrics survey as the ending page for the Milliseconds when I upload the script...but the user support docs make it sound like it will automatically attach the response ID. Anyway around this?

"There is no need to specify the subject id in the Finish Page url. Inquisit will automatically
append the id using the same query parameter that it found when the subject arrived at the
Inquisit launch page."
By Dave - 2/21/2014

Challenge accepted.

> I know that I can just put the URL for the new Qualtrics survey as the ending page for the Milliseconds when I upload the
> script...but the user support docs make it sound like it will automatically attach the response ID. Anyway around this?

#1: Do not specify a finish page when uploading the script. Leave it at the default.

#2: Specify the desired finish page URL (sans any query parameter) *in the Inquisit script* via the <defaults> element's /finishpage attribute.

Query parameter be gone.

(Alternatively: Simply have your 2nd Qualtrics survey ignore / not log any incoming query string, i.e., the participant ID)
By cgshield - 2/21/2014

Oh, that would be easier to go through Qualtrics I think. I don't like messing with my IAT "syntax" too much since it took me so long to get it working the way I wanted it to in the first place :) Plus we will have two IAT's that are randomized so I don't know which one they will be taking first/last.

I think I figured it out in Qualtrics, but I'll run some tests to be sure.  SMART thinking :)
By cgshield - 3/3/2014

I am uploading my scripts, and for Choose how subject ids should be generated, I selected "URLQuery Parameter"  but then I'm not sure what answer to provide for:
"enter the name of url query parameter that contains the subject id"

I tried the link that I am putting at the end of my Qualtrics survey that directs them to milliseconds- and it is not working:
By Dave - 3/3/2014

You enter the *name* of the parameter. In your case it that is ID.
By cgshield - 3/3/2014

Ok, perhaps the ID URL parameter is working, but I'm not getting past the main screen after I click start.  The Java plug-in downloads, then I see nothing.

Not sure if my batch script is not working?

I uploaded the batch script as the main script, then uploaded the other two scripts with their pictures in the next step.  So all three scripts and pictures then have a checkmark next to them before I hit "next" on the set-up page.

My batch reads like this:

<batch>
/ file = "Pain_iat_short"
/ subjects = (1 of 2)
/ groupassignment = random
</batch>

<batch>
/ file = "Race_iat_short"
/ subjects = (2 of 2)
/ groupassignment = random
</batch>



With each script named what I have in quotations (Pain_iat_short, Race_iat_short)

Any suggestions?
By Dave - 3/3/2014

The batch syntax looks okay. I can't tell you more without you providing a link to your launch page.
By cgshield - 3/3/2014

Here is the Milliseconds link:
And here is the link through Qualtrics because I'm not sure the above link gives you the access you need.

If you have to go through Qualtrics, the only required question is "initials" and checking the box to consent.  After that you can skip the next two pages without answering anything (just scroll to the bottom and hit >>) Then after the second page it should take you to Milliseconds where you can gain access by having an ID sent with you from Qualtrics.


By Dave - 3/3/2014

#1: Sorry for overlooking this, but in

<batch>
/ file = "Pain_iat_short"
/ subjects = (1 of 2)
/ groupassignment = random
</batch>

<batch>
/ file = "Race_iat_short"
/ subjects = (2 of 2)
/ groupassignment = random
</batch>

you appear to be missing file type extensions. It should be

<batch>
/ file = "Pain_iat_short.iqx"
/ subjects = (1 of 2)
/ groupassignment = random
</batch>

<batch>
/ file = "Race_iat_short.iqx"
/ subjects = (2 of 2)
/ groupassignment = random
</batch>

or something to that effect.

#2: It also appears you haven't actually uploaded those IAT scripts and their required assets (e.g. pictures) to the server. You need to do that in step #2 of the Web Script Wizard.
By cgshield - 3/3/2014

Thank you for the edit to the script!

I hit "browse" and selected each script and ALL of my photos then hit "upload" and they all loaded.  Then I check-marked them all as I went on to the next step.  I'll try again and see if it works with the updated batch element and I'll see what happens when I click upload. I'll take a screenshot in case it still isn't working.
By Dave - 3/3/2014

Make sure to include the file extension you actually use (could be *.iqx as in the example, could be *.exp; check your local copies of the files). For the record, in Inquisit 4, you *should* use the *.iqx extension, not the legacy *.exp extension. Use File -> Save as... to save any existing exp as iqx.
By cgshield - 3/3/2014

Alright, we've gotten somewhere, woo! 

The exercise is now loading, but it only randomized to give me one of the two exercises.  I want all participants to take BOTH pain and race IAT, but I want it to be randomized which one they get first.

Is the batch element above reflecting that?

(Oh and for the record, I had one of them saved .exp so I fixed that, and I changed the batch element too!)
By Dave - 3/3/2014

> The exercise is now loading, but it only randomized to give me one of the two exercises.

That's what your <batch> script instructs Inquisit to do.

> I want all participants to take BOTH pain and race IAT, but I want it to be randomized which one they get first. Is the batch
> element above reflecting that?

No. That would be

<batch>
/ file = "a.iqx"
/ file = "b.iqx"
/ subjects = (1 of 2)
/ groupassignment = random
</batch>

<batch>
/ file = "b.iqx"
/ file = "a.iqx"
/ subjects = (2 of 2)
/ groupassignment = random
</batch>

Substitute the correct file names accordingly.
By cgshield - 3/3/2014

Ok, still not exactly working.

It gives me the race IAT first each time (the one I put in the b.iqx spot) and when I finish it, it seems to be loading a second script, but it never pops up.  It just shows the launch page with no start button anymore (screenshot attached)

By Dave - 3/3/2014

Your pain_iat_short script is misconfigured. It expects a *numerical subject id* to do condition assignment and hence cannot run using the *alphanumerical subject id* you give it (via the query parameter). Accordingly, you need to specify a proper /groupassignment mode in the script's <variables> element.
By cgshield - 3/3/2014

This section?:


<variables>
/ group = (1 of 2) (block2=targetcompatiblepractice; block3=compatiblepractice; block4=compatibletestinstructions; block5=compatibletest; block6=targetincompatiblepractice; block7=incompatiblepractice; block8=incompatibletestinstructions; block9=incompatibletest)
/ group = (2 of 2) (block2=targetincompatiblepractice; block3=incompatiblepractice; block4=incompatibletestinstructions; block5=incompatibletest; block6=targetcompatiblepractice; block7=compatiblepractice; block8=compatibletestinstructions; block9=compatibletest)
</variables>


I would need to add something to the script within that area to tell it to accept the alphanumerical ID?
By Dave - 3/3/2014

Yes, this section. See your other (working) IAT script for comparision purposes. It uses

/ groupassignment = groupnumber

for condition assignment, as opposed to

/ groupassignment = subjectnumber

which is the default (i.e. the mode Inquisit expects if you don't explicitly specify otherwise).
By cgshield - 3/3/2014

Ok, so I'm looking at both scripts and trying to make them look the same, but they are different anyways.  The race one does not even have the <variables> section only the </expt> section.

So basically I just need to add the line     / groupassignment = groupnumber   into my pain script?

I tried copying and pasting the whole </expt> section from the race iat into the pain iat and still no good.  I also tried just adding the line above  in the <variables> section of my pain script and it still didn't work.

I'm just not sure when and where the changes are supposed to occur based on comparing the two scripts:

<defaults>

/ screencolor = (0,0,0)

/ txbgcolor = (0,0,0)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 5%)
/ minimumversion = "2.0.60809.0"

</defaults>

 

<expt>

/ blocks = [1=attributepractice; 2=block2; 3=block3;4=block4; 5=block5; 6=block6; 7=block7; 8=block8; 9=block9]

/ postinstructions = (summary)

</expt>

 

<variables>

/ group = (1 of 2) / groupassignment = groupnumber (block2=targetcompatiblepractice;block3=compatiblepractice; block4=compatibletestinstructions;block5=compatibletest; block6=targetincompatiblepractice;block7=incompatiblepractice; block8=incompatibletestinstructions;block9=incompatibletest)

/ group = (2 of 2) / groupassignment = groupnumber(block2=targetincompatiblepractice; block3=incompatiblepractice; block4=incompatibletestinstructions;block5=incompatibletest; block6=targetcompatiblepractice;block7=compatiblepractice; block8=compatibletestinstructions;block9=compatibletest)

</variables>

 

<data>

/ columns = [date time subject blockcode blocknum trialcodetrialnum response correct latency stimulusnumber stimulusitem stimulusnumberstimulusitem]

</data>



Any help would be appreciated.  I'm sorry so many questions- I am not a script writer, and the documentation PDF is practically another language.
By Dave - 3/3/2014

All you need to do is add

/ groupassignment = groupnumber

to the <variables> element. No other changes required. Trying to make the scripts look the same by wildly copy-pasting between them will only break stuff. Don't do it unless you know what you are doing.

If you find the time, I would encourage you to complete the tutorials contained in the documentation to learn more about the basics of Inquisit syntax.
By cgshield - 3/3/2014

I will look for those tutorials.  I don't think I noticed they existed.  

I thought I had tried this first before copying and pasting the other aspects from the race script:

It is JUST adding the   / groupassignment = groupnumber  unless I need to delete the  / group = (1 of 2)  part?

I'll try running it again this way.

<variables>

/ group = (1 of 2) / groupassignment = groupnumber (block2=targetcompatiblepractice; block3=compatiblepractice; block4=compatibletestinstructions; block5=compatibletest; block6=targetincompatiblepractice; block7=incompatiblepractice; block8=incompatibletestinstructions; block9=incompatibletest)

/ group = (2 of 2) / groupassignment = groupnumber (block2=targetincompatiblepractice; block3=incompatiblepractice; block4=incompatibletestinstructions; block5=incompatibletest; block6=targetcompatiblepractice; block7=compatiblepractice; block8=compatibletestinstructions; block9=compatibletest)

</variables>
By Dave - 3/3/2014

No. It's simply

<variables>
/ group = (1 of 2) (block2=targetcompatiblepractice; block3=compatiblepractice; block4=compatibletestinstructions; block5=compatibletest; block6=targetincompatiblepractice; block7=incompatiblepractice; block8=incompatibletestinstructions; block9=incompatibletest)
/ group = (2 of 2) (block2=targetincompatiblepractice; block3=incompatiblepractice; block4=incompatibletestinstructions; block5=incompatibletest; block6=targetcompatiblepractice; block7=compatiblepractice; block8=compatibletestinstructions; block9=compatibletest)
/ groupassignment = groupnumber
</variables>
By cgshield - 3/3/2014

WOW, I'm making this too hard.  I was trying to match the race script format.

Jeez, give me STATA or SAS and I can write "code" just fine...but put me into Inquisit and I'm lost!

I'll look for those tutorials for our future uses of Inquisit.
By Dave - 3/3/2014

> WOW, I'm making this too hard.

Yes ;-)

> Jeez, give me STATA or SAS and I can write "code" just fine...but put me into Inquisit and I'm lost!

It's not hard once you get the basic hang of it. And if you are already able to write decent SAS syntax and macros, you should be golden in no time!
By cgshield - 3/3/2014

Fabulous! It is working perfectly!

Now time for a few test runs (with my undergraduate minions) before it goes out on the field.

THANK YOU!!!