Row and Column entries

Basically, just have to get this TextBox2 replaced by the last value +1 of the lap number of the specific bib number.

I have tried to retrieve the last number in the row of the specific bib number, and write it to the Textbox 2, but get this error:

Here is my Blocks:

Any help perhaps?
I need to get the position of the last entry in a specifig row (each Bib Number) to aoutomatically update textBox2.

Thanks very much!

Try this:

  1. Hide the Lap Number Textbox and label (won’t be needed)
  2. Use the following procedure (courtesy of ABG) to find the the largest lap number

blocks (14)

  1. Use this procedure to work out what the next lap number will be

  1. Replace Textbox2.Text with a call to the getNextLap procedure

blocks (12)

All blocks should be draggable

Thanks SO much! Work like a charm. The only issue is now Bib no 1 does not work. any other number from 2 and up works perfectly. WIll play around, re check my code, maybe something went wrong

Bib 1 worked for me. I did start from an empty tinydb though…

Ahh just added a TinyDB Clear All to the reset button.
Thanks so much for your help!

I found something with the mathematics, and don’t know where to start search for that -

The times should be the difference between the previous times and the current.

See screenshow below, might explain better:
The Time intervals was recorded as 5 seconds apart. But the times in the table is different. For example the time between lap 2 and 3 show as 10 seconds, but is only 5 actually.

Thanks :slight_smile:

OK, the elapsedTimePerLap procedure works correctly, I will have another look at what is happening in the lapTimePerLap procedure, something fishy going on there…

I have made a test with a 5 second interval, and here is what I see:

Currently, the next Interval time is calculated by subtracting the current time with the last interval recorded.
The Interval recorded should be the actual time minus the previous actual time.
I guess another seperate list for the actual times recorded?

Yes my first effort on individual lap times was a bit of wishful thinking! I am reworking the whole thing with a better solution, it is complicated, so taking a little more time than I thought.

I believe I have it working correctly now.
Would you be kind enough to test the attached aia.

Some new features:

  • Laps now added automatically
  • Button to switch between recording elapsed(total) time and individual lap times - default Elpased ( I think you can even change this mid recording, not that you would want to…)
  • Reset now resets the app completely, all data recorded is saved to a time stamped tag in the tinydb (note, saving to tinydb only happens when you press Reset)

LapTimesv2.aia (37.1 KB)

Good Morning,
Ive run some testes, work as advertised!. You really went out of your way to help. It is MUCH appreciated. Thanks very much. With my limited knowledge I would never have done this. Thanks for your patience with me. Ive learned a lot!

a Quick question: Is it possible to highlight the last input?

Not with the Tableview extension. You could always add a label above to show the latest entry?

Yes Will do that, should be easy.

Just another question: Is it possible to show the data from the TinyDB when the app is loaded? For example, a race was recorded and saved, and at a later stage you open the app, the recorded info is still showing unless specifically cleared.

No reason why not, set things up to store to tinydb and load from tinydb on startup

Thanks. I run into this error:
Annotation 2020-05-20 123025

Here are my Blocks;

I will appreciate any help.

Thanks

Jakes

it seems to be, you saved some data in tag “empty string”, which does not make much sense, does it?

you might want to clear the database and restart with your tests
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

GetTags returns a list of the tags in TinyDB.
Each tag (item) in that list is a piece of text.
You can not treat a piece of text like a list and add an item to it.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.