Action/bot to update an Existing Row with values from the new Row in another Table

Mattia
New Member

Hello everyone, thank you in advance for your help.
I am fairly new to AppSheet and am trying to figure out how to update an existing Row with values from a form that updates a different table.
I'll explain the structure.
Table "IN" - The table where the user creates a row when starting a job
Table "OUT" - The table where the user creates a row when they end a job
Table "ENTRY" - Table that will hopefully summarize in one row the IN and OUT of the specific job

All three tables have a column called [PairingID] that is used to match the rows from "IN" and "OUT"

I managed to create the 3 Tables, the 2 Views that allow users to perform the start and the end of the job. I was also able to create the Action and the Bot that allows the values in "IN" to be transferred into "Entry" but I am struggling to create the Action and the Bot that transfers the values in "OUT" into the correct row in "Entry" (looking for the [PairingID] to identify the correct row to paste the values.

Hopefully, this is clear enough.
Thank you!

0 5 92
5 REPLIES 5

Use this technique.

Create an action on ENTRY to update OUT related fields using INPUT(). This will be the referenced action in the document.

Call the above action from OUT and pass relevant values.

Hello, thank you very much for your answer.
I tried to the best of my knowledge, but I failed xD

I'll attach the images of the ACTION and the AUTOMATION that should accomplish what I am looking for. Hopefully someone can fix those.

Action on Entry.png

Trying with only one [_INPUT], in this case 
Set a new INPUT as ->  Name: DateTimeFromOut  //  Type:DateTime  //  Default:"165464465" (a random number)
SET COLUMNS ->  Entry[TimeDate Out]=[_INPUT].[DateTimeFromOut]

The following is the Automation:
Automation from Out to Entry.png

Triggers every time a new ROW is added to the table "OUT",
The first step of the action RUNS ACTION ON ROWS in the table "ENTRY"
The referred row is selected by SELECT(Entry[ID Accoppiamento],[_THISROW].[ID Accoppiamento]=[ID Accoppiamento])
(ID Accoppiamento is the Italian for PairingID I was referring to above).
The ACTION associated is the one explained above.
The defined INPUTS are:
- DateTimeFromOut = [_THISROW].[TimeDate OUT]

Still can't find the logic error. 
Thank you in advance everyone!

Everything seems OK.

What results are you getting if any?

Any clues in the Bot monitor log?

The test of the bot reposnd this wor ACTION 1
Failed: 'Execute an Action on a Set of Rows' Data action 'New step Action - 1' for table 'Out failed with exception Cannot get key values when Parent or ChangeImage are null.

Since  [PairingID] is the field connecting rows between Entry and OUT, you want to use

SELECT(
 Entry[key column],
 [ParingID] = [_THISROW].[ParingID]
)

in the reference rows setting: 

Top Labels in this Space