Cannot run Bot to "Run actions on rows" on a table once row added to another table

I have three tables : Book, Bill, PurchasedBooks

Book table has: BookName, AvailableCopies

Bill table has: Date, TotalNumberOfPurchasedBooks

PurchasedBooks table has: BookName, BillDate, price, Quantity 

PurchasedBooks table is the representation of Many to Many relation between Bill and Book

the issue is that i need to update the Quantity of a book once a new record is added to PurchasedBooks table with same BookName.


I created the below:
1. Created Action under Book table with name "Increase AvailableCopies" and Do this "Data: set the values of some columns in this row"

2. Created Bot with below:
     Event: 
                Data Change: "Adds only" 
                Table: PurchasedBooks
                 Condition: true
     Process:
                 Table: PurchasedBooks
                  Step type: Run a data action  
                  Custom action : Run action on rows
                         Referenced Table: Book
                         Referenced Row: SELECT(Book[BookName],[bookName]=[_THISROW].[BookID].[BookName])
                        Referenced Action : "Increase AvailableCopies"
i tested the action alone and it works fine, and tested the event and it fire correctly, but the Book records are not updated when a new rows added to PuchasedBooks table

0 1 49
1 REPLY 1

Welcome to the Community!

@khaled0x07 wrote:

Referenced Row: SELECT(Book[BookName],[bookName]=[_THISROW].[BookID].[BookName])


Referenced Rows are identified by their Key values, so the expression should be:

FILTER("Book", [bookName] = [_ThisRow].[bookName])

 

Top Labels in this Space