How to copy rows to another table based on conditions multiple conditions

Hi Guys

Perhaps a simple question for one of the more experienced app creators here, but I have been racking my brain over this for a while.

How do I copy multiple rows of data from table 2 to table 3 if condition on table 1 is true, and condition on table 2 is also true

The fabrics table is a child of products, which is a child of orders. Inventory table is a separate table.

When the user updates status of the orders table to ‘Deposit Paid’, I would like to create an action or workflow or bot that copies only specific rows of the fabrics table that pertain to that order, to the inventory table.
The specific rows are determined by a column on the fabrics table [Inventoried] = yes

So the final action would copy rows that meet three conditions:

  1. Orders Table[Order ID] = this row
  2. Orders Table[Order Status] = deposit paid
  3. Fabric Table[Inventoried fabric] = yes

The amount of different actions and ways you can bind them together in AppSheet is absolutely amazing, but slightly confusing for a new user

FYI the maximum amount of Fabrics per product is 2, the maximum amount of products per order is 10, so a potential of 20 fabric (rows) to be copied at any one time, if that matters.

Based on what i have been reading I believe i need a data change workflow driven action that is targeting the fabrics table, with a condition that references the Orders table [Order Progress] Column

Running a change data task, which itself is an action on the fabrics table to: Add a new row to another table using values from this row, which has a condition to watch for [Inventoried] = “Yes”

At least thats my current theory, in practice i can’t seem to get the standard
[_THISROW_BEFORE].[Order Status] <> [_THISROW_AFTER].[Order Progress]
to reference the grandparent table, so my next step is to create a virtual column to hold that data. I don’t know, i feel like i’ve tried a million things and i’m no where close to cracking this

Am i going about using the correct recipe of actions and workflows here or am I barking up the wrong tree? any help appreciated, cheers guys

https://www.appsheet.com/samples/This-app-shows-how-to-use-reference-actions?appGuidString=e76d2e73-3d26-475c-a8f8-9911f5015920

2 Likes

Too easy! thanks Marc

2 Likes