Hi there, i have a slice named “Billed Work Orders” which contain items that have a [Billed Status] value of either “Not Billed” , “Billed” or “Archived”. My report runs on the 1st of each month & if an entry has a Billed status of “Billed” an API call should be made to change its status to “Archived”.
Right now, that table only has one entry with a “Billed” status and a row key of “5af32c0b”. The issue is that the report log, shows that the API Call fails because of :
“Error: “Row having key ‘5af32c0b’ not found.””
Any ideas on why i’m getting this error since the key actually exists in the table?
Could you post a screenshot of your report settings, and copy/paste the JSON body here please?
Sure thing. Here’s the JSON :
{
"Action": "Edit",
"Properties": {
"Locale": "en-AU",
"Location": X, Y",
"Timezone": "Pacific Standard Time",
"RunAsUserEmail": "email"
},
"Rows": [
{
"WO_MASTER_UID": "<<[WO_MASTER_UID]>>",
"JobName": "<<[JobName]>>",
"ASSIGNED_USER_UID": "<<[ASSIGNED_USER_UID]>>",
"WO Date": "<<[WO Date]>>",
"CLIENT_UID": "<<[CLIENT_UID]>>",
"CLIENT_POOL_UID": "<<[CLIENT_POOL_UID]>>",
"Describe the problem": "<<[Describe the problem]>>",
"WO_ACTION_LIST": "<<[WO_ACTION_LIST]>>",
"Repair Filled By": "<<[Repair Filled By]>>",
"Repair Req. By": "<<[Repair Req. By]>>",
"Billed Status": "Archived",
"LastEditBy": "<<[LastEditBy]>>",
"LastEditDate": "<<[LastEditDate]>>",
"CreatedBy": "<<[CreatedBy]>>",
"CreatedDate": "<<[CreatedDate]>>"
}
]
}
and here’s the screenshot of the report settings:
It may not be related to your problem, but the X,Y and Email should both be valid LatLong/Email values.
You can hard-code it with a string, or use HERE(), USEREMAIL(), but the result should be valid for the data type.
Is your Key-Column a Text-Type Column?
If it’s a Number, remove the quotes on the value.
"WO_MASTER_UID": "<<[WO_MASTER_UID]>>",
If you’re using security filters on this table, then it could be the ‘email’ in Properties that’s preventing access.
Try hard-coding with the admin’s email, or set the report to bypass security filters.
I simply replaced the email and lat long with dummy values for the sake of sharing the info here. They do actually have valid values.
As for the key-column, it is a text type.
I’ll try enabling the security option.
Update: Bypass Security filter option didn’t solve it. The 404 still occurs.
Hi again, i still haven’t figured it out. I also tried using a webhook to a URL of the recommended format
https://api.appsheet.com/api/v2/apps/{appId}/tables/WO_MASTER/Edit
but no luck either. Do you happen to have any other ideas?
The endpoint should end with /tables/{tableName}
<-- No /Edit
at the end
The ACTION you want to perform (Add/Edit/Delete/Custom_Action_Name) goes in the webhook BODY, not the URL.
Authentication may be added to the URL or header.
{
“Action”: “Edit”,
“Properties”: {
“Locale”: “en-AU”,
“Location”: “X, Y”, // you have forgotten a quote at the beginning
“Timezone”: “Pacific Standard Time”,
“RunAsUserEmail”: “email”
},
Do you have any valid_if, reset_on_edit, required_if etc. expression for this [Billed Status] column?
Only a show_if expression. Nothing else
User | Count |
---|---|
41 | |
28 | |
24 | |
24 | |
13 |