Action to update field in other table

Think i'm losing the plot, or missing something obvious.

Two tables: customer data, inventory data. There is some blurring between the two, but for the most part this is how they're meant to operate.

When a customer is assigned an item from the inventory this item should become 'unavailable' in inventory. 

Watched this video which made it seem really simple, but obviously i'm missing something.

https://www.youtube.com/watch?v=zh6zbQjtgLE

Action 1:

dhdevans_0-1692650682919.png

Referenced row formula:

select(CycleHub.org App[Combo],[_THISROW].[Bike Provided1]=[Combo])

Action 2:

dhdevans_1-1692650759713.png

Form view is set to trigger action 2 on save:

dhdevans_2-1692650789847.png

Try as I might it isn't doing the update. Note that [Combo] is a virtual column, not sure if it makes any difference at all.

Solved Solved
0 6 244
1 ACCEPTED SOLUTION

I've watched this video half a dozen times now; i understand the principal, see the logic, but can't quite seem to apply it to the database structure i have in place here.

I am thinking of creating a bridging table that will run a daily action for updating the inventory table.

A bodge, and i'm seriously unhappy about it, but at least it'll be automated.

View solution in original post

6 REPLIES 6

Ist die gesetzte Event Actions auch in der Formularansicht Ihrer Record Tabelle "RAWDATA"?

The form action points to the the CycleHub.org app table, not RAWDATA.

dhdevans_0-1692691391736.png

 

Action 1 (that executes action 2) in RAWDATA, Action 2 in Cyclehub.org App.

I'll also add that there is currently no REF fields linking the two tables which might also be causing issue. To add insult to injury there are four columns in the child table that would link to the parent table in a many to one relationship. 

Throw me in the SQL deep end and i'd have this sussed in a few minutes but AppSheet has me baffled.

I've watched this video half a dozen times now; i understand the principal, see the logic, but can't quite seem to apply it to the database structure i have in place here.

I am thinking of creating a bridging table that will run a daily action for updating the inventory table.

A bodge, and i'm seriously unhappy about it, but at least it'll be automated.

In the end i created artificial keys in both tables, a bridging table and an automation that is scheduled hourly to check if a key exists in the bridging table (and therefore in both tables) and updates the unit to 'unavailable'.

What an absolute ***** of a thing to have to do, but it's done.

Top Labels in this Space