Add a new row to another table not working

Hi All,

I am new to Appsheet but have been able to build an app to do most of what I need, but I am having trouble with getting the action to add a new row to another table using values from this row. I have added the below action step and condition.

 

PaulK72_0-1686099237102.png

PaulK72_1-1686099277991.png

I then have another action to execute on a set of rows as below:

PaulK72_2-1686099352120.png

I have set up a bot to run the 2nd action as a data action on a schedule, but when I test it I get the following message:

PaulK72_3-1686099444458.png

I know I am missing something simple, but can't figure out what it is, any assistance would be greatly appreciated! Thanks, Paul

 

Solved Solved
0 4 1,146
1 ACCEPTED SOLUTION

Ok. Yah, you don't need a reference action at all. Just directly run the 'copy order to customer hub' action from the bot.

Also, why not combine your 2 described bots into 1?

View solution in original post

4 REPLIES 4

I've never seen that error before, so only guessing here. You're running this from a scheduled bot? You have the ForEveryRow option in the Event turned off I imagine? That means the bot does not run within the context of any record. Which mean it can't run actions like you have. You must have switched between bot settings/configs a few times to even have been able to build that in a bot.
You can turn the ForEveryRow option on, but be aware it will now run your action on every row in the table. To prevent that, simply add a condition that specifies only a single row.

Another problem that I potentially see, is your "Referenced Rows" expression in the 2nd action. That VC presumably contains a list of key values from the Customer Hub table, but the action you're executing lives on the Sheet1 table, so that doesn't really make any sense.

Also your description makes it sound like you're only wanting to create a single new record, but this reference action setup is only really necessary for creating more than one record. You can maybe get away with just running the 1st action from the Bot.

Hi Marc,

For context I have a group of sites entering customer order details for collection into the app throughout the day and at specific times each day I want to transfer those details to another table (customer hub) for that team to process to the relevant carriers. I run a bot across the order status to update it from "New" to "Sending to Customer Hub" and then I want to run another bot to copy those rows that meet the order status condition of "sending to customer hub" to the customer hub table.

I have the "for every row option" turned on as I want it to run the action on every row that meets the condition of an order status of "Sending to Customer Hub" in the Sheet 1 table and copy the relevant columns from those rows over to the Customer Hub table, but there may be a better way to achieve this. I don't fully understand the referenced rows and I think that is a big part of what the problem might be, if I wanted to check all rows in Sheet 1, what should the referenced rows look like?

Thanks, Paul

 

Ok. Yah, you don't need a reference action at all. Just directly run the 'copy order to customer hub' action from the bot.

Also, why not combine your 2 described bots into 1?

Thanks Marc, I was making it more complicated than it needed to be. I've got it to work now. Good suggestion to combine the bots, I will definitely do that, but wanted to get each one doing the right thing first. Thanks again!

Top Labels in this Space