Changing Json file nomenclature

Hello,

A colleague has asked to modify the outputted json file from the default UUID + ExamStartTime (ex: 3f776.2019-12-02T13-52-44.json) to a format that includes SubjectID as well as additional response fields from within the protocol.

Are there resources on Tabsint.org on how to modify this?

Hi @Devon

The name of the result file can be changed with the resultFileName parameter in the protocol_schema.json.

Tristan

Mostly able to follow the schema, but my ability is still falling a little short here. Problem I am running into is wanting to have a resultFileName include multiple responses from the protocol. The below code is an abbreviated example. In it includes 2 pages, 1 for subject ID, the other for some responses that also help with subject identification. If possible, I want the resulting json to contain SubjectId.MissionNumber.IterationNumber.json.

  1. what syntax is needed to link two possible variables for response filename. I.e. linking “examResults.subjectId” & “examResults.protocolId”

  2. Is it possible to link response variables from a specific “presentationId” or other flag? The below example, I want both variables from the same page. But don’t know if “multipleInputResponseArea” is valid input for the resultFilename. Or if I would need to possibly separate the two additional values I am interested in (Mission and iteration #) on to separate pages.

{
    	"hideProgressBar": true,
    	"title": "Example JSON Rename",
    	"resultFilename": "examResults.subjectId",
    	"pages": [
    		{
    			"id": "subjectId_text",
    			"title": "Enter Subject ID",
    			"questionMainText": "Please Enter Subject-ID",
    			"responseArea": {
    				"type": "subjectIdResponseArea",
    				"generate": false,
    				"responseRequired": true
    			},
    			"setFlags": [
    					{
    				"id": "subjectId",
    				"conditional": "result.response"
    			}
    			]
    		},
    		{
    			"id": "mission_and_iteration",
    			"title": "Multiple Input Response Area",
    			"svantek": true,
    			"questionMainText": "Enter the values associated with this test",
    			"responseArea": {
    				"type": "multipleInputResponseArea",
    				"verticalSpacing": 15,
    				"textAlign": "left",
    				"inputList": [
    			
    				{
    					"inputType": "dropdown",
    					"options": [1,2,3],
    					"text": "Select Mission Number"
    				},
    				{
    					"inputType": "dropdown",
    					"options": [1,2,3,4,5,6],
    					"text": "Select Iteration Number"
    				}
    				]
    			}
    		}
    ]
    }

I was able to call on some support to help fix this issue. I did need to change the multipleInputResponseArea to a multipleChoiceResponseArea and separate the two values, Mission and Iteration, on two separate pages with conditional formatting.