How can I create data storage using clock component and display it in a table using calendar?

Oh, nice idea, but I have a feeling that it is not suitable for using my app.

What happens here is:
The user feels his pulse with his three fingers and detects various perceptions. Then he starts the app and selects the buttons that correspond to his perceptions (he collects one-reading data). Finally he saves the data and can close the app or go to see the table.
Some time later, he sits down again to feel his pulse, again collects the data (perceptions) by clicking the buttons and saves the next reading session.
In one day he can do from 0 to 20 readings, or more. It depends on how much he wants to practice in order to become an expert in the pulse-reading technique.

Data collection must be very fast and intuitive, that's why I use buttons instead of the form.

However your idea can be useful for something else. Every contribution is precious :slight_smile:

1 Like

I love the simplicity of this way of storage.

When the user goes to the table by clicking List button, he must see the current day in the Datepicker calendar and all the readings done on that day displayed in the table.

I have already tried to apply that Dynamic Table with Javascript and prefer to avoid it.
My appetite goes for the Arrangements :slight_smile:

This is a possible quantity and distribution of data:

I have merged Time and Activity display to optimize space on the screen.
Even though we have the date appearing in the Datepicker, initially I kept the date in Day&Time column thinking about export, but for now we can try this solution.
Anyway I would like to keep the storage with Date and Time and also separate it from the Activity. Only in the visualization I would do as in the attached table.

...so this is my table with labels in Horizontal Arrangements :slightly_smiling_face:

screen

I was able to feed the table with the data saved in Day namespace, but in a very rudimentary way. Obviously it cannot work for 50 table rows.

Nadi_05.aia (955.8 KB)

How can I improve the blocks and create the procedure to generalize feeding of labels of one row and apply it to any row?

Something this way,

In anticipation of your (and others) future need to scroll through a display of customized table rows, I created this sample:

This sample lets you scroll through hundreds of rows.

Regarding your blocks, I see a big red triangle of text replacement blocks where you steamroll a table into a text then try to pick out the resultant markup (",) characters by text replacement. For more customized control over table cell formatting, consider using the JOIN With Separator (\n or "," or " " or \t) block for your list to text conversion.
A table to text conversion might require 2 passes, building rows then piling them up with \n.
There is a table to csv conversion block that's even simpler.

I used the Join with separator block, but there are still segments to remove.

IMG_0445

You remember that I am using milliseconds tags, I do not convert table to text.

Hi Ram
I will try this solution tomorrow,
...but there will be 50 rows, will I have to make 50 lists?

Mean, 50 * 6 = 300 Labels!
Yes, this is how you can refer label using anyComponent, since you cannot provide label names dynamically.

You don't need 50 lists.

You need a table that can expand to 50 rows.

Here's how to get such a table.
(Displaying a table has many solutions in AI2, divided into 3 schools of thought:)

  • JavaScript in a Web Viewer (Taifun)
  • Component Generators (TimAI2 et al)
  • Fixed number of rows (like 3) hard display with Canvas scrollbar and global offset variable (me)

You decide.

I followed your suggestion, but it doesn't work. What did I do wrong?


Abraham, I did not understand your corrections, can you explain better?

I intend to proceed with the fixed rows as I have set.
So what's your solution?

Swap them as...

...unfortunately it doesn't work
it shows the same error warning as before

I suggest you add the required Canvas and buttons Vertical Arrangement before diving into the coding of the display of the current window into the data. You will need them to get the current offset, which you are missing in your blocks.

Once you have all that, post a fresh .aia export.

col is needed here not row, didn't copy well :upside_down_face:

image

this is what it is to be

Note: for robust solution and great learning, I recommend you should follow ABG's suggestion.

I have to point out the difference between the two different types of loops over lists:

  • for each item in list
  • for each number from 1 to length of list by 1

Use the first when you only care for the contents of the list and you don't care for the order of the list.

Use the second loop when the order is important and you are matching one list against another list, index by index. Be prepared to use the select item from list block in that loop, using the list index from the loop block. There should no need to ask for a new local variable to act as a list index in that circumstance.

1 Like

P.S. I have updated my sample to cover cases where the incoming data table has fewer rows than the Label table.

Thanks Ram anyway :cherry_blossom:

1 Like

My good intentions weren't enough to place the components you requested, ...not knowing what it's for, where to put VA, Canvas and buttons.
So I just cleared my project of unnecessary blocks and attach the .aia file.
Nadi_06.aia (953.4 KB)
Thank you