I have two tables where both have fields for customer id and status. The status in both tables is pulled from a ENUM Ref List.
When a record is added to Table 2 I would like for a Bot to take that status and update the same status for the customer id in Table 1.
I created a Bot to trigger on event type Data Change for Table 2 and only for adds. I then have a step that calls a Update Table 1 process set to Add | Status = [Status].[Status]
The Update Table 1 process is set for Table 1 to run a data action to set the row values for the Status column
This is where I'm stuck as I don't know how to get the Status from Table 2 and update the Status in Table 1 for the same customer id
I get this error message when it does run: Error encountered in step with name [New step]: Error: Row having key '' in table 'Table_1' in field 'Customer Record' is required to have a value
Solved! Go to Solution.
I understand.
How about using AppSheet API?
You should first Enable the API. And then, select Run a task > Call a webhook.
Target Table Name will be Table 1.
And the request body will be like:
{
"Action": "Edit",
"Properties": {
"Locale": "en-US",
"Timezone": "Pacific Standard Time"
},
"Rows": [
{
"Customer ID": "<<[Customer ID]>>",
"Status": "<<[Status]>>"
}
]
}
And headers:
Authorization: "Bearer <<Your Access Key>>"
Content-Type: "application/json"
It will find the Table 1 data where Customer ID is the same to the new added data to Table 2. And then it will update the Status to the new value.
User | Count |
---|---|
35 | |
11 | |
3 | |
3 | |
2 |