GetRespondentEmailLogByTask

Description

Gets the email log entries, that are logged during a respondent emailing task, based on the task id.

Only entries that are logged for the authenticated user will be returned. In addition to the fields specified by the "fieldName" input parameter, two standard fields will be in the data set: * TimeStamp The time when the entry was logged. * TaskId The task id of the email task that logged the entry.
Signature
DataSet GetRespondentEmailLogByTask(string key,string projectId,string[] fieldNames,long taskId)

Parameters

Name Data Type Description

key

string required

The authentication key

projectId

string required

The project ID

fieldNames

string[ ] required

The respondent field names that should be in the returned result.

taskId

long required

The task id to get log entries for.

Response

Data Type Description

DataSet

The email log entries.

Example

//***************************************************
//
// Get the respondent email log by its taskid
//
// Before this method has any use, email must
// been sent to respondents with the logging option
// activated. This can be achieved through the
// "SendEmails" method on the "SurveyDeployer" web
// service. This method will also return a task id
// that is to be use in this method. For this example
// we just assume it is 1.
//
//***************************************************

// Initiate webservice
SurveyDataSoapClient sd = new SurveyDataSoapClient();

//Specifies the respondent-fields that we will have
//returned in the result.
string[] fields = new string[]{"email"};

// Get the email log.
DataSet result = sd.GetRespondentEmailLogByTask(key, projectID, fields, 1);
//Do something with the result.