JSON Webhook: Action Edit question (Row key field 'ID' value is missing)

I must be missing something really simple here,

I want to edit multiple rows all at once using a webhook in the entire table (because doing it line by line would probably time out as it’s recalculating a varible).

I keep getting " Row key field ‘ID’ value is missing ", Heres the Body.

{
   "Action": "Edit",
   "Properties": {
      "Locale": "en-US",
      "Location": "47.623098, -122.330184",
      "Timezone": "Pacific Standard Time"
   },
   "Rows":
   [
       <<start: filter("Subscriptions", true)>>
      {
         "Amount Owing": "<<sum([Related Overdue Invoices][Amount Remaining])>>"
      }
      <<end>>
   ]
}

What am I Missing?

Here’s the settings im using

The Edit is applied to each row individually. You need to specify the key field name and value for each row to be updated.

1 Like

Like this? @Phil

   "Rows":
   [
       <<start: filter("Subscriptions", true)>>
      {
         "ID" : "<<[ID]>>"
         "Amount Owing": "<<sum([Related Overdue Invoices][Amount Remaining])>>"
      }
      <<end>>
   ]

Give it a try and see what happens.

Another Error I’ve been getting, 700 Rows too much?

Error:
"Unable to add/edit/delete row in table 'Subscriptions'. → The remote server returned an error: (413) Request Entity Too Large."

Yep, and I don’t know what the limit is. You’ll have to experiment.

I would switch to GAS for such bulk updates.

2 Likes

Not sure it will solve your problem but worth testing those alternatives?

  1. Instead of construct <> within a template, you create slice beforehand and select slice name when you set up webhook. Not sure the appsheet architecture, but this filtering process potentially consuming huge amount of time to select rows before changing value action is fired. Could reduce the time and api would start before TIMEOUT happens?

  2. Within the JSON boty, user “selector” instead of <> <> expression. Technically this may bring no change in terms of required amount of time but worth testing it. For this feature, how to write syntax you can visit this docs. https://help.appsheet.com/en/articles/2680586-reading-records-from-a-table This selector is introduced in GET / READ the selected row out of API call, but it could be used in EDIT verb as well.