SDK Reference v2.0.0 / SurveyTaskQuery

SurveyTaskQuery

struct SurveyTaskQuery : PagedQuery

Specifies filtering and page-navigation criteria for survey task queries.

All query properties are optional. Set non-nil/non-default values only for the properties you want to use for filtering or sorting.


SortOrder
enum MyDataHelpsKit.SurveyTaskQuery.SortOrder : String, Codable

Specifies sorting order for survey task results.

defaultLimit
static let defaultLimit: Int

The default and maximum number of results per page.

statuses
let statuses: Set<SurveyTaskStatus>?

Filter by one or more survey task status values.

surveyID
let surveyID: Survey.ID?

Auto-generated, globally-unique identifier for the survey which this task assigns.

surveyNames
let surveyNames: Set<String>?

Internal name for the survey in MyDataHelps which this task assigns. Filter by one or more values.

sortOrder
let sortOrder: SortOrder?

Return results in the specified order. Defaults to dateDescending.

limit
let limit: Int

Maximum number of results per page. Default and maximum value is 100.

pageID
let pageID: SurveyTaskResultPage.PageID?

Identifies a specific page of survey tasks to fetch. Use nil to fetch the first page of results. To fetch the page following a given SurveyTaskResultPage use its nextPageID; the other parameters should be the same as the original SurveyTaskQuery.

init(statuses: surveyID: surveyNames: sortOrder: limit: pageID:)
init(statuses: Set<SurveyTaskStatus>? = nil, surveyID: Survey.ID? = nil, surveyNames: Set<String>? = nil, sortOrder: SurveyTaskQuery.SortOrder? = nil, limit: Int = defaultLimit, pageID: SurveyTaskResultPage.PageID? = nil)

Initializes a new query for a page of survey tasks with various filters.

statuses

Filter by one or more survey task status values.

surveyID

Auto-generated, globally-unique identifier for the survey which this task assigns.

surveyNames

Internal name for the survey in MyDataHelps which this task assigns.

sortOrder

Return results in the specified order.

limit

Maximum number of results per page.

pageID

Identifies a specific page of survey tasks to fetch.

page(after:)
func page(after page: SurveyTaskResultPage) -> SurveyTaskQuery?

Creates a copy of this query for a page of results following the given page, with the same filters as the original query.

page

The previous page of results, which should have been produced with this query.