Dynamic filename using Subject ID and Group ID


Author
Message
lakeside
lakeside
Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)
Group: Forum Members
Posts: 34, Visits: 121
Q: How do you include the subject ID and/or Group ID in the output filename?

I've seen hints but no explicit documentation. Dave recommends looking at this file but it is a dead link. See Multi-Language IAT if you would like to fix the link. There is a wishlist where filenames with Subject ID is explicitly requested and recognized as a great idea but no further follow-up is provided.

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
> Q: How do you include the subject ID and/or Group ID in the output filename?

If you set the /separatefiles attribute to true in your <data> / <summarydata> element, the subject id will be part of the file name.

> Dave recommends looking at this file but it is a dead link. See Multi-Language IAT if you would like to fix the link.

Deals with an entirely different issue: *Displaying* a certain stimulus (e.g. a specific picture file) based on the subject id. It has nothing to do with naming the output (i.e. data) file.

lakeside
lakeside
Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)
Group: Forum Members
Posts: 34, Visits: 121
Thanks, Dave. I've modified my script but am not getting a Subject ID in the filename. Note, I am writing to a network share, executing multiple tasks with a batch file, using the script monkey and manually giving the Subject ID and Group ID via the pop-up window.
<data>
/file = "\\MY-NETWORK\taskData\IowaGamblingTask_rawdata.iqdat"
/ columns = [date, time, subject, values.cardsselected, values.groupnumber, response, latency,
                    values.gain, values.loss, values.currenttotal]
/separatefiles = true
</data>
I've also tried just specifying the file directory, leaving the filename completely up to Inquisit.

https://www.millisecond.com/forums/uploads/images/2d115b67-c76c-45de-9c58-0c67.jpg

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Only works when you don't specify a partial name via the /file attribute. Try

Correction: Also works with /file specified according to my tests:

<block myblock>
/ trials = [1=mytrial]
</block>

<trial mytrial>
/ validresponse = (anyresponse)
</trial>

<data>
/ file = "myfile_raw.iqdat"
/ columns = [date time subject blocknum blockcode trialnum trialcode]
/ separatefiles = true
</data>

Are you running an outdated version? You should be using 4.0.6.0 (you can always get the latest version from https://www.millisecond.com/download ). If not, there must be something else interfering in case of your particular scripts. Not sure what that could be, offhand.

Edited 10 Years Ago by Dave
lakeside
lakeside
Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)
Group: Forum Members
Posts: 34, Visits: 121
I can get the Subject ID included within the filename when I use this file statement:
/file = "C:\Users\userName\Desktop\"
/separatefiles = true
but when I write it to a network share and keep the rest of the script identical, the Subject ID is not includeD:
/file = "\\MY-NETWORK\taskData\"
/separatefiles = true
If, instead of the UNC path, I use the lettered drive for the same directory, the Subject ID is written to the filename:
/file = "Z:\NETWORK-DIRECTORIES\taskData\"
/separatefiles = true
Is this a Windows thing or an Inquisit thing?

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Thanks for the update. Interesting result re. the UNC path. Shouldn't be a Windows-thing, the Inquisit-side needs looking into. I'll file a bug report / check whether there's any reason for the different behavior (I can't think of one, but I might be missing something).

lakeside
lakeside
Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)Guru (7.2K reputation)
Group: Forum Members
Posts: 34, Visits: 121
Hi Dave,

Did you determine if the lack of subjectID in the filename when writing to the UNC path was expected behavior? If this is a bug, any idea when a fix might come out?

The primary advantage of writing to the network share is that it can remain hidden (i.e., unmapped) from the respondent but it is super handy to have the subject ID included in the filename.

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
The fix will be included in the next release (4.0.7.0), which shouldn't be too far away (weeks not months). Hope this helps.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search