Bot Firing Issue

Hello all,

Overall my goal is to delete a row in another table based on a row being added to a table that has a matching value in a column. Details below. 

I have a table called Deletion Log and a table called Batch Code Generator. They both have a column called [batch code id] in them. In the Batch Code Generator table it is the key. The deletion log has another key. In the deletion log the column is a ref type(it does not reference the batch code generator table, but another table called status log where [batch code id] is the key) and in the batch code generator table it is a text type. 

What I want to do is use a bot to call a delete action by using a row being added to the deletion log table as a trigger and use run action on rows as the data action. In that dialogue I have the referenced table as Batch Code Generator table and the following formula to track down the row I would like to delete: SELECT(Batch Code Generator[batch code id], [batch code id] = [_thisrow].[batch code id]). The referenced action is set to delete, but nothing happens. Why?

MadScientistNut_0-1679180077460.png

 

0 5 156
5 REPLIES 5

The easiest way to undestand what is going on with a bot is to open "Monitor" and simply take a look. 

One possible reason is that you have different field types, like Deletion Log[batch code id] is a text field but Batch Code Generator[batch code id] is a number field. Just a guess.

Your expression should simply be: LIST([batch code id])

I appreciate the responses. I am having a hard time understanding how to trouble shoot in the test page in the bot area. Could you provide some resources? I was able to achieve what I wanted through an action when the form saves which seems to have solved it.

Joseph, wouldn't that select all of the [batch code id] columns for deletion? The reason I ask is I did have some success when I plugged in Batch Code Generator[batch code id]. The bot fired, but ended up deleting everything in the table. Good thing I am still testing!

Generator[batch code id] is effectively the list of all values of the batch code id column in Generator table. 

[batch code id] is just a single value taken from the row that triggered the event, and you wrap it with LIST() because this field expects a list not a single value, though it will be a single-element list. 


@MadScientistNut wrote:

I am having a hard time understanding how to trouble shoot in the test page in the bot area


Use "Monitor", not "Test"

Top Labels in this Space