You can update one or more existing records in a table.

See this example.

URL

Use a URL in the following form to invoke the API.

POST https://api.appsheet.com/api/v1/apps/{appId}/tables/{tableName}/Action where

  • {appId} specifies the GUID of the AppSheet application. You can obtain the {appId} from the Manage > Integrations > IN pane.
  • {tableName} specifies the name of the table.

Body

The HTTP Body contains:

  1. The Action name “Edit"”.
  2. Optional properties such as Locale, Location, and Timezone.
  3. One, or more, Row values to be updated. Each individual Row value must include the key field values of the record to be updated. Each Row value may contain one or more field values of other fields to be updated in the record. If a field’s name is omitted, that field’s value is not changed. In the following example, the key fields of the record are "FirstName" and "LastName".

    When you wish to update two or more rows, it is more efficient to update all of the rows in a single API call than to update each row in a separate API call. Using a single API call is significantly more efficient because we make few calls to the data provider.

{
"Action": "Edit",
"Properties": {
"Locale": "en-US",
"Location": "47.623098, -122.330184",
"Timezone": "Pacific Standard Time",
},
"Rows": [
{
"FirstName": "Jan",
"LastName": "Jones",
"Last Review": "09/31/2017 23:59:59",
"Rating": 0.9750,
"Salary": 5555.45,
{
"FirstName": "Ian",
"LastName": "Ivans",
"Age": 23,
"Department": "Accounting",
}
]
}

When a Record is Updated

  1. All fields are initialized using the current values from the existing record.
  2. The field values you specify in the request are applied.
  3. AppFormulas are computed and Change fields are updated.
  4. Required, Required_If, and Valid_If conditions are enforced.
  5. The record or records are updated in the table.
  6. Workflow rules, if any, are invoked. 

Row Having Key Not Found

See topic "Row Having Key Not Found" here.

Did this answer your question?