Update Multiple Row Data

dev_bc
New Member

Hi,

2X_3_360fd9ef3c8971ea538d3c681b8274b6ff3d16a2.png
My question is how to auto update the Row2 and Row6 data at “Average” column data to 3 when after i add new row data?

Bellow is the preferable data in table.
2X_3_323eee59bc6fb403b61547047300fc23f28bb3b0.png

Solved Solved
0 7 2,653
1 ACCEPTED SOLUTION

The simplest way would be to do the following:

  • Remove the app formula from your average column
  • Create an action to set the value of the average column
  • Create a ref update action, to gather the list of records to be updated then enact your average action
  • Use this ref update action in the Form event, so when someone saves a new record this action fires off.

Here’s some screenshots of how I set this up in an app of mine to update LineItems on an invoice:

In the “Referenced Rows” space you’ll want to do something like:

select(table[TableID], [Group] = [_thisrow].[Group])

Then for the “Referenced Action” space, you’ll enter the average action you created.


If you look under the hood of this sample app, you can get a sense of how I got about updating all children records triggered off updates to the parent.
https://www.appsheet.com/samples/How-to-use-Actions-to-copy-data-from-parent-records-to-all-related-...
Your case is similar - in the sense of how you’ll go about building it - so seeing the setup might help.

View solution in original post

7 REPLIES 7

Could you explain why it is that only row 3 average changes?
Just to get a better idea of a formula.

Could you explain how it works?

Hi Jonthan,…

The Average value is tight with 2 condition.
1- status must be Accept
2- must with same Group
So, the match the condition for GroupA only Row2, Row6 and Row7(new row) are same and for GroupB only Row3, and Row4 are same .

When after the condition are match the new average value will ready to update in by using this formula [Total]/[number of matching row]

The simplest way would be to do the following:

  • Remove the app formula from your average column
  • Create an action to set the value of the average column
  • Create a ref update action, to gather the list of records to be updated then enact your average action
  • Use this ref update action in the Form event, so when someone saves a new record this action fires off.

Here’s some screenshots of how I set this up in an app of mine to update LineItems on an invoice:

In the “Referenced Rows” space you’ll want to do something like:

select(table[TableID], [Group] = [_thisrow].[Group])

Then for the “Referenced Action” space, you’ll enter the average action you created.


If you look under the hood of this sample app, you can get a sense of how I got about updating all children records triggered off updates to the parent.
https://www.appsheet.com/samples/How-to-use-Actions-to-copy-data-from-parent-records-to-all-related-...
Your case is similar - in the sense of how you’ll go about building it - so seeing the setup might help.

Hi MultiTech,

Great explanation and great sample and video… It help to solve problem.

Thank you,…

Glad you got it figured out

Hi,

I have tried to update all the rows based on the date on another table. No error but my app froze. can you please help?

 

 

I Require to put "TRUE" on the rows that are included in my criteria.

this is the expression I have used to update the rows: 

Referenced Rows: FILTER(
"Expenses Liters",
AND(

([Date] >= [_THISROW].[PO Start Date]),
([Date] < [_THISROW].[PO End Date])
)
)

Mario_Moncada_1-1656676165708.png

 

Mario_Moncada_0-1656675856805.png

 

Please start a new topic for your question.

Top Labels in this Space