Elements updated and linked together

elmarra

Member
Good evening everyone,
I wanted to ask you for advice, an idea, help from you.
I have created lists for the creation of service sheets for the cars of my charity. I have created one for each car to allow volunteers at each service to write down the name of the driver, patient transported, place of departure and arrival and other various fields, each list corresponds to a car in order to keep track and automatically update the km.
To do this I have created three elements:
1) "km departure"

Element type "databasejoin" which calls the return km field of the list by setting the data where in "ORDER BY id DESC LIMIT 1"
in order to automatically have the last value set by the return km

2) "km traveled"

Element type "calc" which calculates the difference between the set departure and return km

3) "km of arrival"

Element type "field" simply by having the volunteer enter the km read from the odometer.

and the volunteer once you have entered the various data I mentioned earlier
when a new record is created, he automatically has the starting km, he must enter only the arrival km.

Now I wanted to expand the project.
I wanted to insert a "vehicles" section to be able to keep track of insurance dates, revisions, maintenance, etc. and I also wanted to have a constantly updated odometer.
And above all, I wanted to create a single service sheet and give the volunteer the possibility to select the vehicle used so as not to have to make one for each car.
I wanted to connect and use the following data. But I got a hang in that I failed.
I had tried to do it this way.
I had created a new "vehicles" list with various elements including km, and in the service I had tried to link the "km" value of the vehicle list to the "service sheet" list by recalling the "km" field for the starting km , and tried to have the km of the vehicle list auto-updated, but I can't automatically, I can only if I open the vehicle list and create a new record then I have the km data updated to the last travel sheet with the return km, but obviously it is not a solution as it should update automatically otherwise it does not work.
obviously besides this I also tried other solutions, but the first one seemed the closest to my solution.

I apologize for the length of my post.
So in summary what I would like to do is this:
create a single list for the service sheets and from this select a vehicle previously created in another list. But to this I must have the count of the km so that with each new entry the last ones are automatically loaded and the volunteer, as before, must enter only those of arrival.
What is the way forward?
Thank you all.
 
Yes, I apologize for the excess text.
Ok well so with a little effort I will be able to get the result I hoped for.
I only ask of you a very humble thing.
If you give me a clue since English is not my mother tongue and I struggle to understand.
In the list "vehicles" the element "km" how should I set it to read the last data inserted in the list "service sheet" element "km arrival"?

And in the list "service sheets" in the element "km arrival" do I have to set something specific?
I hope you can give me the clue to lead me on which path to follow.
Thank you
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top