I have two tables that need to interact.
1 is "Mileage Tracking" and the 2nd is "Inspections"
When the user fills out the inspection form, the column [Vehicle] is automatically set to that users truck VIN. The user enters a value for miles in [Odometer reading] and the date is auto saved in [Date/Time] among other unrelated info. I need the new [Odometer reading] data entered into the [Last Inspection Miles] column of "Mileage Tracking" an d the [Date/Time] data moved into [Last Inspection Date].
The "Mileage Tracking table shares a key with Inspections. The Key is [Vehicle] in "Inspections" and [VIN] in "Mileage Tracking"
I Created an action in "Inspections" Called Action A. The photo shows it's settings.
I Created an action in "Mileage Tracking" called Action B. See Below.
When I submit a new inspection form I get the following error.
I followed old videos on YouTube to get this far. I am great at programming PLCs but this is a new world. I hope someone can point me in the right direction to get this working. I have automations that depend on the data in the Mileage Tracking so that we can schedule service for the guys in a more efficient manor. Were a small shop with about 20 employees total.
Thank you for your time.
Solved! Go to Solution.
Okay I was able to rub a few brain cells together to finish this task.
First of all I would like to thank @Steve For giving me the foundation to lean on with this endeavor.
Following the screenshots below you can set this up in just a few minuets. It is important that the ref columns on both tables contain the same identifying information.
In the Actions tab add a new action for the table that you want to affect. Next to the table name you will see a + icon if you hover your mouse. Skip the AI junk and select Create new action for (table). Follow the structure in the first screenshot.
You may see some warnings that will go away after saving your app.
Now add an action to the table that will be providing the data to update the affected table. Follow the second screenshot.
Save your app.
Once a user completes a form to add a row to the source table it will cause the data to be updated automatically to the affected table.
Please post screenshots of the column configurations of these two tables that include the relevant columns.
Here you are.
Last Inspection Miles is of type Number:
But you're trying to set it to a Ref value (see MAXROW()๐
I recommend you revisit the approach I recommended in that other post and use it here.
I am trying to follow your first example and I am getting this warning.
@PyramidRebuild wrote:
I am getting this warning.
Did you configure the Input section for that action? The Input section is further down the configuration screen. You may have to expand it.
@PyramidRebuild wrote:
I want the one with the highest value in Odometer or the one that was just submitted.
Oh, just use MAX() rather than MAXROW().
I don't understand how to configure the input section. My Mileage Tracking table has 20 different vehicles listed. The Inspections table has every inspection that has been performed.(Over 100) When a user submits a new inspection record I only want add a new record to Inspections(works perfectly) and then update the Mileage tracking table only for the vehicle that was selected during the inspection.
The Idea behind using MAXROW() was because I want to set the new current mileage from inspections into Mileage Tracking and Inspections contains hundreds of rows with the same VIN key column so I don't know how to specify that I want the one with the highest value in Odometer or the one that was just submitted.
Okay I was able to rub a few brain cells together to finish this task.
First of all I would like to thank @Steve For giving me the foundation to lean on with this endeavor.
Following the screenshots below you can set this up in just a few minuets. It is important that the ref columns on both tables contain the same identifying information.
In the Actions tab add a new action for the table that you want to affect. Next to the table name you will see a + icon if you hover your mouse. Skip the AI junk and select Create new action for (table). Follow the structure in the first screenshot.
You may see some warnings that will go away after saving your app.
Now add an action to the table that will be providing the data to update the affected table. Follow the second screenshot.
Save your app.
Once a user completes a form to add a row to the source table it will cause the data to be updated automatically to the affected table.
User | Count |
---|---|
17 | |
11 | |
7 | |
4 | |
3 |