AppSheet Bot: Use Data from Event Trigger

Hi AppSheet form, 

I have two tables: Items & ChangeLog and I'd like to update a column value in the Items table with data from the ChangeLog table when a new row is added to the ChangeLog table.

I set up an AppSheet Bot with data change event when new rows are added to the ChangeLog table however I'm not able to reference the data from the "new row" event in subsequent processes and step.

Do you have any tips for this? I suspect that I may be able to achieve this by creating an action on the Items table that references the "most recent" ChangeLog row, but that seems less precise than referencing a specific event via bot automation.

Thank you!

0 14 318
14 REPLIES 14

Steve
Platinum 5
Platinum 5

Off the top of my head and without testing, you could use an action of type Data: execute an action on a set of rows from the ChangeLog row to invoke an action of type Data: set the values of some columns in this row. Use inputs (see Set input values dynamically in data-change actions) to pass the updated values from the ChangeLog to the target Items row.

Thanks for this advice, I made some progress following those instructions, but found myself blocked again. The bot throws an error, and I believe it doesn't know which row to act upon. FWIW I'm using AirTable as my database.

 

Screenshot 2025-02-04 151157.png

 

Your actions would look something like this:

Steve_0-1738704266980.png

Steve_1-1738704295642.png

And this is what the step of your bot's process might look like:

Steve_2-1738705024644.png

 

Thanks again for the helpful reply. 

I copied these configurations, but unfortunately, I'm encountering the same issue as before: the bot monitoring logs (screenshot above) appear to show null results from the trigger Event. I believe this causes the first step: Update Item of this ChangeLog to fail to lookup the ChangeLog row and therefore perform no subsequent operations.

I guess your event must be misconfigured.

Perhaps you're right. I created a test bot that simply sends an email when new rows are added to ChangeLog and the bot also shows a null results. Very strange because the Bot Event configuration is as simple as can be.

Anyway, thanks for your continued support. I greatly appreciate it!

More screenshots of your configuration might guide further help...

Here are screenshots of my bot configuration as well as the monitoring logs. The table actions (not shown) are configured just like your screenshots:

Bot Eventappsheeet_1.png

 

Bot Stepappsheeet_2.png

 

Monitoring Logsappsheeet_3.png

Please post a screenshot of the columns screen in the app editor for the ChangeLog table including at least the key column.

ChangeLog Table

Primary key is id

objectUuid is foreign key to Items Table

appsheeet_4.png

 

Items Table

Primary Key is uuid

lastEventAirTable ID - attempting to write column Row ID from ChangeLog table (not shown) to this field via bot

appsheeet_5.png

How is the ChangeLog row being added?

How does the id column of the added ChangeLog row get its value?

Is the ChangeLog row being written to AirTable?

ChangeLog rows are being added through a form for a slice of the ChangeLog table. I tested without the slice and found the same null result.

id on the ChangeLog rows are set with an initial value of UPPER(UNIQUEID()). AirTable does have a Row ID column that it uses as a primary key, but I make sure to use a AppSheet derived primary key (the id column with a formula)

Yes the ChangeLog rows are being written to AirTable

I'm afraid I can't think of anything else. I have no experience with AirTable, so I can't say whether there might be a problem there. I'm going to have to suggest you contact AppSheet Support for further help with this. Good luck!

Attn @AleksiAlkio 

Thanks for all your support thus far! 

Top Labels in this Space