Store, show with table and retrieve records made of multiple value

Dear all,
At the moment I've achieved to create a list of entries to be filled. Next step is:

  • store all info evenctually as single record (my best guess)
  • display the records in a table (in the future this would ideally be sortable by different record field)
  • select one of the record from the list and display (possibly in a temp screen)

the record would be something like:
| pic_name | value1 | value2 | data1 | data2 ....

First point where I'm completely stucked is how to gather the info in a singol record. What sort of record to use? Dictionary? List? other options?

Depending on the above how to store all the records? I'm aware of DBs but I'm not sure how to generate consecutive tags automatically. Is it DB a good way? any other options?

the list of records can be saved locally or remotely.

Once I got the record clearly defined I will be able to investigate the rest.

First step is the most crucial for usability and I'd appreciate every hint or point me to the right direction with something similar already available without inventing the wheel again.

Cheers

Firstly, show your relevant blocks for what you have achieved.

You want to use lists for this.

You would most probably need to set your record elements to a list, probably as a sublist.

Then you can show your resultant list of lists in a table (html/extension) - you can then sort your underlying list and redisplay the table as required.

Your display table should allow you to select a row and return the row contents, or index, to then display the record.

Here's a TinyDb and dictionary based approach:

Hi and thanks for prompt help.

Going over @ABG link, it is mentioned SQlite DB which at the moment ring the bell lauder.

I like the searchable possibility and if my "dream" doesn't foul me I should be able to select a record also from the pic name or, in other word, create a grid of thumbnales and by selecting a picture I should retrieve the whole record.

So far I think this will be my first go unless I'm missing somenting and similar also with list of lists or tinyDB..

I'll keep u posted as I'll proceed

Cheers

You can access the local sqlite database... however you will need an extension to do that... let me suggest to use my sqlite extension App Inventor Extensions: SQlite | Pura Vida Apps, which follows the KISS principle- keep it simple stupid... there are also other sqlite extensions...

Taifun

Hi @Taifun ,

thanks for the feedback. I checked your extensions as few others. Don't take me wrong but to start I'm using simplesql to keep it the simplest as possible and stay focused on the general programming

@TIMAI2 thanks for highlighting the html/extension which is going to be the next step together with opening an overlaying screen showing the record selected

cheers

Hi there,

I'm wondering if there is a faster way to create a full reports without using html?

At the moment the aim is to create a working app leaving the cosmetics to a second stage if app will b accepted

Cheers

Using an html table or the Tableviewer extension is probably the quickest way to display your tabulated data. You can use labels or listviews (yaml) to display the data but it may take some formatting to get it looking anywhere near decent

Thanks @TIMAI2 , got Ur point and I'll take a look also to the tableviewer extension. I'm not there yet but not far.

At the moment I have SQL queries working but I have trouble with picture saving directory and picture naming.

I'm not at my desk now which Should not b a problem. The idea is

  • after picture taken name or rename the picture with something like WA naming scheme. Let say PIC-yyyyMMdd-hhmmss
  • understand or define a local picture folder which ideally will b under app directory (the picture doesn't need to be available in the gallery)

At the moment, using file extension including taifun one I only manage to get the absolute path like

File:///ABSOLUTE_PATH/FILENAME.png

Store only the file name in the dB make it more readible and I understand might not b relevant but in the learning curve the file manipulation with a case study is a great opportunity

Any lead and hint is welcome

Thanks