Action to copy value from field in child table to field in parent table

Hi guys, I am in need of some help with this one.

I have an app for vehicle inspections and fuel logs.

I have the following three tables and fields(this is a simplified version):

“vehicles” table

  • vehicle_id
  • current_kms

“inspections” table

  • inspection_id
  • vehicle_id
  • vehicle_kms

“fuel_logs” table

  • fuel_log_id
  • vehicle_id
  • vehicle_kms

When a user completes an inspection form or a fuel log form the respective vehicle_kms field is populated with an initial value from the “vehicle” table current_kms field and there are some validation checks in place to prevent data entry errors (i.e. can’t be less than current or significantly more). The user would then update the entry to the current reading.

When the form is submitted I want the value that is stored in the “inspections”/“fuel log” vehicle_kms field to be pushed into the current_kms field in the “vehicles” table. I have been trying to do this with actions and have been reading through the forums but can’t seem to figure it out.

I really appreciate any help you can offer.

Thanks!

0 1 224
1 REPLY 1

If I have correctly understood your requirement, you could do the needful by using reference actions. In the sample app below the reference actions update child records based on chaneg in the parent record. You could use a reverse flow to update the parent record ( Vehicles) based on change in the latest child record ( Inspections)

https://www.appsheet.com/samples/This-app-shows-how-to-use-reference-actions?appGuidString=e76d2e73-...

Top Labels in this Space