Action when a new Row is Added

Hi there!

How can I create an automatic action when a new row is added in a specific table?
Eg: If a new row is added to table 1, then hit the action and add a value in column A in table 2

0 9 1,432
9 REPLIES 9

Steve
Platinum 4
Platinum 4

I recreate this: Changing a Data Value in Another Table
From: https://help.appsheet.com/en/articles/1363923-changing-data-from-a-workflow-rule-or-scheduled-report

This is winning to the set of actions?

Workflow Rules are Not Triggered By

Workflow rules are not triggered by:

  1. Changes made directly to the spreadsheet or database.
  2. DataChange actions invoked by a workflow rule.

I suppoused it does but itยดs a bit confusing having the opsite in other documentation page.

So how can I do what Iยดm looking for?
I try also a MAX(SELECTโ€ฆ in a virtual column but not workingโ€ฆ

@Aparicio_Pineyrua If you are looking for a value to automatically be added to โ€œcolumn A in table 2โ€ when a new row is added Table 1 then a Workflow is the way to do it as @Steve is suggesting.

You can create a Workflow that triggers only when a row is added. The table it operates on is Table 1. In the Workflow, you would add a Data Change step that calls an Action, lets call it Action A.

In Action A, you would choose the type as โ€œexecute an action on a set of rowsโ€, this will allow you to transition to operate on Table 2. Insert the Reference Rows expression to identify the row or rows in Table 2 you want to update. Then add the Reference Action, call it Action B.

In Action B, choose the type as โ€œset the values of some columns in this rowโ€ to perform your update(s) on the row in Table 2. At this point you will no longer have current access to the row in Table 1. If the value you need for updating is in the row in Table 1, you will need to create an expression to join back to Table 1 and retrieve that value.

I hope this helps!

Hi @WillowMobileSystems I think I made all what your are sugesting, but not the join expression.
Can you help me with the join expression? And where it should be added? In the column of witch table or inside the workflow rule?

There could be two joins you are referring to.

  1. Identify the row to be updated after the add.
  2. Retrieve the data from the new row to update with.

Which one do you need help with?

I think is the option 1, beacause what I need is to appsheet identify that change of row in the other column and trigger the workflow to send the email.

Ok, so in my Workflow example above I mentioned Action A and updating the Reference Rows expression. This is the expression that identifies the row(s) you need to have updated. For it to work you need to have a column on Table1 and Table2 that link them in some fashion so you know how to pick the row in Table 2 that you want.

Speaking in general terms, you would need to have an expression similar to this:

FILTER(โ€œTable2โ€, [_THISROW].[table 1 link column] = [table 2 link column])

โ€œtable 1 link columnโ€ and โ€œtable 2 link columnโ€ would be replaced with actual names from your tables.

[_THISROW] is an AppSheet variable and is really only needed if table11 and table2 link columns have the same name. Some developers suggest you always use the [_THISROW] variable.

I hope this makes sense. Just let me know if it doesnโ€™t.

Still not triggering the workflowโ€ฆ

The actions works, when I enter a new row in Table 2 in Table 1 the column regarding the action in changing the value.
I enter the formula Filter(โ€ฆ in both tables and nothig happends

Sorry, I didnโ€™t see your post until now. To make sure a poster sees your response, you want to make sure to click the Reply button โ€œinsideโ€ the post

If you use the Reply button at the very bottom, the post becomes a โ€œgeneralโ€ post and will get buried amongst all the other posts. Posters in your message thread will not be notified. Sometimes thatโ€™s what you want but usually not.

Anywayโ€ฆdid you get this figured out?

Top Labels in this Space