Editing rows from one app to another

Hi everyone,

I’m trying to get my workflow webhook to update a column for specific rows in another app table with an if statement. I’m not sure how to write the json for this.

@tingtingandrea

@tingtingandrea
You can also refer to this post as well

1 Like

Hey @LeventK ,

I’ve looked over almost all the documents and I cant seem to get it to work. It keeps giving me error messages. I’m using webhook Present: Appsheet: Edit Row
Thanks

{
“Action”: “Edit”,
“Properties”: {
“Timezone”: “Pacific Standard Time”
},
“Rows”: [
<<Start: Filter(volunteer, [email]=[_thisrow].[email])>>
{
“email”:"<<[email]>>"
<<If: [General Onboarded timestamp]="">>
“General Onboarded timestamp”: “<<[#ask-notion timestamp]>>”
<>
},
<>
]
}

@tingtingandrea
Here it is:

{
	"Action": "Edit",
	"Properties": {
	"Timezone": "Pacific Standard Time"
	},
	"Rows": [
	<<Start: Filter("volunteer", [email]=[_thisrow].[email])>>
		{
		"email":"<<[email]>>"
		"General Onboarded timestamp": "<<IFS(ISBLANK([General Onboarded timestamp]),[#ask-notion timestamp])>>"
		},
	<<End>>
	]
}
		

Thanks @LeventK,

I think I missed something. I’m getting an error message. Also I’m realizing I dont know how to use code blocks on here:

Failed: Action not performed because 3 errors are present. Error: Workflow rule ‘Add Notion 2’ action ‘Edit Timestamp’ Body template. Expression ‘Filter(volunteer, [email]=[_thisrow].[email])’ is invalid due to: Unable to find table ‘volunteer’. Error: Workflow rule ‘Add Notion 2’ action ‘Edit Timestamp’ Body template. Start expression ‘Filter(volunteer, [email]=[_thisrow].[email])’ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the ‘Key’ column of the referenced table. Error: The webhook body is empty.

@tingtingandrea
I believe it’s my bad…Inside the FILTER() expression, you need to wrap your tablename within quotes. So the payload shall be like this:

{
	"Action": "Edit",
	"Properties": {
	"Timezone": "Pacific Standard Time"
	},
	"Rows": [
	<<Start: Filter("volunteer", [email]=[_thisrow].[email])>>
		{
		"email":"<<[email]>>"
		"General Onboarded timestamp": "<<IFS(ISBLANK([General Onboarded timestamp]),[#ask-notion timestamp])>>"
		},
	<<End>>
	]
}	

@LeventK
dam, similar error. Do I need to fill in the body? It still says that it can’t find the table:

@tingtingandrea
Won’t you be placing that JSON payload inside the Body parameter already??

@LeventK
I have it as a file on gdrive

@tingtingandrea
Are you using it as a JSON body template?

@LeventK
yes I am. I did actions, that worked but for some reason edit isnt working. I did all the same things while changing the payload obviously. Is it possibly an issue where the app I’m using the webhook in doesnt have the table, it’s a table inside another app?

Hi @LeventK, dont mean to bug. But, I’m not sure if you saw my previous message. Thanks.

Yes @tingtingandrea I saw your post, but I haven’t understood what you exactly mean with “… Is it possibly an issue where the app I’m using the webhook in doesnt have the table, it’s a table inside another app?..

1 Like

Hi @LeventK I have 2 apps. The 1st app has the table “Volunteer”, the 2nd app which I’m using the webhook in, does not have the table “Volunteer”. I want to trigger edit for “Volunteer” in 1st app from the 2nd app.

How is your webhook workflow setup? Ensure that you have selected:

@LeventK, What info do I need in my Body vs my Body template JSON file?

I think that’s my issue

@tingtingandrea
You either use the Body or Body Template, you can’t use both. Try with Body only first and then re-try with using the template only. Also please ensure that both of the apps are under the exact same appsheet account.

1 Like

@LeventK I tried both body and body template and neither worked. It still gave me the error, cannot find table “Volunteer”. The rest of the webhook setup is as you have labeled in the previous image. I’m not sure what I’m doing wrong at this point. They are both the same account as well.

Can you check if your Volunteer table in the second app accepts EDIT?