Saltar al contendio prinicipal

Answer-Data Data Model

Advertencia

Esta página aún no se encuentra traducida al español.

COTAnswerData

Description

The Answer-Data Data Model (COTAnswerData) is an object that corresponds to the answers.data array field found in the Answers Data Model (COTAnswer). It contains all the data gathered through a survey form submitted by a user.

Data objects usually go in pairs. The first represents the survey question's displayed field label. The second, the input data.

Location Survey Component

Click here for specific COTAnswerData field descriptions regarding the Location Survey Component, also known as survey+gps.

JSON Sample

"data": [
// Survey question field label
{
"code": [],
"display": [
"Date of Arrival"
],
"responses": [],
"process": [],
"_id": "615c8c3bb478e900079e6076",
"user": "600ac7d8df54617a28ac89ff",
"question": "613fd2304a8541000782f313",
"contentType": "application/vnd.cotalker.survey+text",
"identifier": "date_arrival_00_1631572528245",
"diff": []
},
// Input data: Date and Time
{
"code": [
"date",
"timezone=America/New_York"
],
"display": [
"Date"
],
"responses": [
"2021/10/4",
"14:00"
],
"process": [
"1633363200000"
],
"_id": "615c8c3bb478e900079e6077",
"user": "600ac7d8df54617a28ac89ff",
"question": "613fd2304a8541000782f314",
"contentType": "application/vnd.cotalker.survey+datetime",
"identifier": "date_arrival_00",
"diff": []
},
// Survey question field label
{
"code": [],
"display": [
"Choose City"
],
"responses": [],
"process": [],
"_id": "615c8c3bb478e900079e607a",
"user": "600ac7d8df54617a28ac89ff",
"question": "615ae3e7b0ca3100073e467c",
"contentType": "application/vnd.cotalker.survey+text",
"identifier": "cities_00_1633346534779",
"diff": []
},
// Input data: Multiple Choice using Properties (Elements)
{
"code": [
"{\"allow\":\"propertyType\",\"value\":\"location\",\"filter\":\"*\"}"
],
"display": [],
"responses": [
"{\"_id\":\"613fd0154a8541000782eb14\",\"subproperty\":[],\"isActive\":true,\"name\":nyc_00\",\"display\":\"New York\"},\"propertyType\":\"location\",\"600ac7d8df5461626aac89c0\",\"createdAt\":\"2021-09-13T22:26:29.673Z\",\":\"2021-09-13T22:26:29.686Z\"}"
],
"process": [
"613fd0154a8541000782eb14"
],
"_id": "615c8c3bb478e900079e607b",
"user": "600ac7d8df54617a28ac89ff",
"question": "615ae3e7b0ca3100073e467d",
"contentType": "application/vnd.cotalker.survey+property",
"identifier": "cities_00",
"diff": [
{
"_id": "615c8c3bb478e900079e607c",
"op": "remove",
"path": "/responses/0",
"modifiedAt": "2021-10-05T17:32:43.598Z"
}
]
}
],

Fields

FieldDescriptionTypeNotes
codeDisplays code parameters according to the content type.[string]Click here for an example using survey+gps content type.
contentTypeIndicates the question's content type.string
diffEach diff object indicates changes or modifications made to an answer after the form was submitted.object[ ]The diff field follows RFC6902 standards.
diff[index].fromIndicates origin of moved or copied data.stringNot present in all operations.
diff[index].modifiedAtIndicates when the modification took place.ISODateYYYY-MM-DDTHH:mm:ss.SSSZ
diff[index].opIndicates the type of modification carried out.stringremove, replace, add
diff[index].pathPoints to the responses or code path that was modified.string
diff[index].valueDepending on the content type, shows the previous value that was modified.string
displayIndicates the displayed field label in the survey.[string]Only present in objects that represent the survey field labels.
identifierIndicates the question's unique identification name.string
processShows the input data that will be processed.[string]
questionReferences the asked survey question.ObjectId<COTQuestion>Questions Data Model
responsesShows the input data after being processed.[string]
userIndicates the user that submitted the form.ObjectId<COTUser>Users Data Group

Deprecated

FieldDescriptionTypeNotes
groupstringDEPRECATED

Additional Resources

Help