Hello, I am having trouble correctly invokin...

workflow
(Taylor Felt) #1

Hello,

I am having trouble correctly invoking the api to edit a specific row. I am able to add rows fine so my guess is there is an issue specifying the current key being edited.

When the workflow rule is triggered, I want to update the same row(s) that triggered the workflow. I tried using [_Thisrow] but that doesn’t work. any suggestions?

{

“Action”: “Edit”,

“Properties”: {

“Locale”: “en-US”,

“Location”: “47.623098, -122.330184”,

“Timezone”: “Pacific Standard Time”,

“RunAsUserEmail”: "YourEmail@google.com"

},

“Rows”: [

{

“{Row Key}”: “?”

}

] }

(Philip Garrett) #2

@Taylor_Felt

The easiest way to do this is to let AppSheet generate the JSON body for you.

See topic “Creating a JSON Body Template File” in this article help.appsheet.com - Invoking Webhooks from a Workflow Rule or Scheduled Report

Make certain you specify the webhook URL for the webhook first as described under topic “URL” in that article.

The generated JSON body will populate all of the fields of the record including the key fields. You must populate the key fields when doing an update. All other fields in the row are optional.

Invoking Webhooks from a Workflow Rule or Scheduled Report help.appsheet.com

(Taylor Felt) #3

@Philip_Garrett_Appsh I can get it to work but it is not a solution because it takes very long to load and is posting the same values multiple times, however, I don’t have this issue when I specify the next or previous row {_rownumber+1}.