How to trigger action in a different table

HI,
i found some similar cases in other topics but iโ€™m not sure they are my exact case, soโ€ฆ
i have a main table full of records that i need to update, but not just editing them.
So i have create a โ€œtwinโ€ table with most of the same columns but this time the table is empty; this one is suited to create new event on every change with a timestamp, so i can keep track of all the changes and the history too.
Now, i need to update the main table with the newest values of the second one.
I have created an action in the first table with all the field i need to update, with a lookup(maxrow(dataโ€ฆ) in the second table
Everything is fine, ecxept that i have to go into the first table and press the action.
I would like to update automatically when i create a new record in the second table.

thanks

1 10 5,148
10 REPLIES 10

Hi, you would need to use action type โ€œAdd a new row to another table using values from this rowโ€.

Iโ€™ve also tryed this action and itโ€™s a way easier to do instead of make the reverse update thing.
Didnโ€™t know this action. I think i will go with this one.

Still curious about the other method, that works too, but not for every columns

Aleksi you rite, i have added a workflow when โ€œALL_CHANGESโ€ happen, the action โ€œAdd a new row to another table using values from this rowโ€ will apply, the only thing needed to do is to map the columns one by one

Hi, @Mark_11, iโ€™ve just worked it out. here goes.
i have the same: a main table and a second with less columns. each time a record is ADDed in the second, Actions and Workflow automatically update the columns in the correct row of the main.

thereโ€™s an article about this, it helped, but i donโ€™t have it handy, i searched update column โ€ฆ

Action 1:
pick your main table,
choose Data: Set values of some columns in this row,
select the columns to update, you can do several in the same action. the expression is tricky, one of mine.

LOOKUP(MAXROW(โ€œsecond tableโ€,โ€œtimestampโ€),โ€œsecond tableโ€,โ€œkeycolumnofsecondtableโ€,โ€œcolumnwithdatatoputinmaintableโ€)

Action 2:
For Records of this table: pick second table
chose Data: execute an action on a set of rows
Referenced table: pick main table
Refโ€™d Rows: value in a column of second table that picks correct row in main table. my expression:
SELECT(ASSETS[ESO No],[ESO No]=[_THISROW].[ASSET ESO No])
Refโ€™d action: name Action 1

Great, it worksโ€ฆexcept one field; i did copy and past for the lookup formula for every fields in action1 so itโ€™s weird.

Can you clarify the mechanism of action 2 and the workflow, so the next time i can get it myself.

thanks

Edit. is more than one field that doesnโ€™t work; iโ€™m trying to figure out why. I have 10 columns to update; 2-3 of them remain with the old data

Edit 2. It works if i press the action 1 manually.

Any suggestions?

Workflow 1:
pick second table
Update event: ADDS_ONLY
Reaction: Change Date
WF name: freehand
Data Change Action: pick Action 2

hope it helps

Great, just solved my issue. Thanks.

Top Labels in this Space