Data Container function: getDataContainerRecords

You can use this function to retrieve all values of a DataContainer table. If you only want to use the records configured for the element and page, use the getDataContainerRecordsForElement function.

Example for getDataContainerRecords
if let arrItems = CDockSDK.getDataContainerRecords(byContainerId: "123", orderBy: "myField", orderDirection: "desc") as? [[String: String]]{
    for dict in arrItems {
        s = s + "\n\n>>> RECORD:"
        s = s + String(format:"\n item pageId=%@ elementId=%@" , item.pageId ?? "", item.elementId ?? "")
        for (key, value) in dict {
            s = s + "\n"
            s = s + key + ": " + value


  • byContainerId= DataContainer tables ID, which is returned with the function getDataContainerList.
  • orderBy= The field name to sort by. The field names are returned with the function getDataContainerFields.
  • orderDirection= the values desc and asc are possible.

In addition to the field names and field contents for each data record, the following values are also returned:

  • pageId= Page ID for which the data record was configured
  • elementId= Element ID for which the record was configured

More information

Feedback or Questions

We are always happy to help you with questions about the code or other questions.

Was this page helpful? Yes No

Topics on this page