GetDataGeneral
Description
Returns a ConfirmitDataResult containing the response data.
Signature
ConfirmitDataResult GetDataGeneral(string key, SurveyDataTransferDefBase dataTransferDef, ResponseToken token)
Parameters
Name | Data Type | Description |
---|---|---|
key |
string required |
The authentication key |
dataTransferDef |
SurveyDataTransferDefBase required |
The transfer definition object. |
token |
ResponseToken optional |
The transfer token. |
Example
//***************************************************
//
// GetDataGeneral
//
//***************************************************
// Initiate webservice
DataTransferSoapClient dataTransfer = new DataTransferSoapClient();
// Create a transfer definition
SurveyDataTransferDef transferDef = new SurveyDataTransferDef();
// Set the project id for the Confirmit project that data will be returned from
transferDef.ProjectId = projectId;
// Choose the form called "mySingle" from the top level ("responseid") and the form
// called "myOpenQuestion" from the loop-level named "l2"
transferDef.VariableCollections = new TransferVariableCollection[]
{
new TransferVariableCollection
{
LoopId = "responseid",
VariableNames = new string[] {"mySingle"}
},
new TransferVariableCollection
{
LoopId = "l2",
VariableNames = new string[] {"myOpenText"}
}
};
ResponseToken token = null;
ConfirmitDataResult result;
// Gets the data from the Confirmit project while there are still more data left.
do
{
result = dataTransfer.GetDataGeneral(key, transferDef, token);
token = result.ResponseToken;
} while (!result.ResponseToken.LastDataSet);