The Table Field is the only field type which can contain other fields.

Table Fields have a property named rows, which represent a collection of row objects. Each row object has a columns property which contain a collection of fields that represent the columns of that row.

"My Sample Table": {
      "rows": {
        "0": {
          "columns": {
            "Column 1": {
              "text": "this is some text",
              "id": "99ce5621-d5a3-461e-bb58-a47901106271",
              "name": "Column 1_0",
              "type": "TextBox"
            },
            "Column 2": {
              "value": "2015-04-15T09:32:00.0000000+00:00",
              "displayValue": "4/15/2015 9:32 AM",
              "id": "acac9894-8178-4ef1-af3f-a47901106271",
              "name": "Column 2_0",
              "type": "DateTime"
            }
          }
        },
        "1": {
          "columns": {
            "Column 1": {
              "text": "this is also a text field",
              "id": "99ce5621-d5a3-461e-bb58-a47901106271",
              "name": "Column 1_1",
              "type": "TextBox"
            },
            "Column 2": {
              "value": "2015-04-26T09:32:00.0000000+00:00",
              "displayValue": "4/26/2015 9:32 AM",
              "id": "acac9894-8178-4ef1-af3f-a47901106271",
              "name": "Column 2_1",
              "type": "DateTime"
            },
            "Column 3": {
              "text": "jk",
              "id": "65ea5872-7d05-4e1e-a62c-a47901106271",
              "name": "Column 3_1",
              "type": "TextBox"
            }
          }
        },
        "3": {
          "columns": {
            "Column 2": {
              "value": "2015-04-02T09:32:00.0000000+00:00",
              "displayValue": "4/2/2015 9:32 AM",
              "id": "acac9894-8178-4ef1-af3f-a47901106271",
              "name": "Column 2_3",
              "type": "DateTime"
            }
          }
        }
      },
      "rowCount": 4,
      "columnCount": 3,
      "id": "e411a90f-ad49-4927-9b3b-a47901106271",
      "name": "My Sample Table",
      "type": "Table"
    }
  }

📘

NOTE:

The id, name, and type are not necessary when setting or updating the Table Field and related Child Fields. These properties are returned in the JSON of the request for readability.

Table Operations

Changing a Field Value

In general, the Table Field has no properties which can be set or updated. Instead, updates will be performed on the actual fields that the Table Field contains.

To update a Field within a Table Field only the information relevant to the update are required. Namely, the row, the column, and the new value for the field that will be updated.

As an example, updating a Text Field contained in the 2nd row of the 3rd column of a Table Field would like:

"My Sample Table": {
  "rows": {
    "1": {
      "columns": {
        "2": {
          "text": "Update this field only!",
          "id": "99ce5621-d5a3-461e-bb58-a47901106271",
          "name": "Column 1_2",
          "type": "TextBox"
        }
      }
    }
  }

📘

NOTE:

Even if a table has multiple rows or columns the GoFormz API will only update the values specified. All other fields will remain the same.

Clearing a Field

To clear a column Field simply set the value of the column to NULL. The only relevant information to include to clear a value is the row number and the column number.

The following example demonstrates how to clear the value of a Text Field contained in the 2nd row of the 3rd column of a Table Field:

"My Sample Table": {
  "rows": {
    "1": {
      "columns": {
        "2": NULL
      }
    }
  }

Clearing an entire row

To clear an entire row of columns within a Table Field simply set the specific row value to NULL. The only relevant information to include to clear a row of columns is the row number to clear.

The following example demonstrates how to clear the columns contained in the 2nd row of a Table Field:

"My Sample Table": {
  "rows": {
    "1": NULL
    }
  }