Skip to first unread message

zogst...@googlemail.com

unread,
May 9, 2014, 4:57:19 PM5/9/14
to mitappinv...@googlegroups.com
Hi

I'm looking to create an app to store scores etc I'm happy to work through lots of worked examples and in principle I like the App inventor but if anyone can share their thoughts on a best route to take, that would be much appreciated as I can then focus on this rather than trying to learn everything before making a start.

Imagine wanting to store scores from a ten pin bowling competition.
Its likely the device (most likely a phone) won't be online during the storing of the data as signals are unlikely inside the building and wifi is not always available.

You'd want to store ball by ball and frame by frame scores for an unlimited number of bowlers and then potentially be able to look back at stats after the event.

Ideally, be able to store games indefinitely and compare scores as time progresses.

Now TinyDB seems too simplistic for this to me from what I've read - but am I writing it off too easily. Does anyone have any details on more complex uses of TinyDB that I could look at to see how I might use this.

FusionTables sound more likely an answer, but do I need constant online access and can I easily distribute an app for users to use their own FusionTables (ideally without having to know anything about them) or do all users have to link back to my table. I believe that using O Auth the former can be achieved, but does it result in an app that a user simply asks to install in the play store and just has to give agreement to the various access rights or is there more involved.

Any thoughts welcome

BTW the actual planned app isn't for bowling but its a more useful analogy to ask the question

Cheers


Taifun

unread,
May 9, 2014, 5:28:17 PM5/9/14
to mitappinv...@googlegroups.com
TinyDB can store not only simple text as values, but also lists and list of lists...
just take a look at how to work with lists of lists...

Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by Taifun.         

zogst...@googlemail.com

unread,
May 9, 2014, 5:59:56 PM5/9/14
to mitappinv...@googlegroups.com
Taifun

Many thanks - I generally follow the page you linked to - but without an example of storing data in 'lists of lists' I must admit I find it hard to see how you can replicate a larger scale database

For example how would you structure a two person game, with 3 rounds, ten frames in a round and up to 21 balls bowled for each person per round
In a very simple spreadsheet you could store it thus:

Name Round Frame Ball Result
Fred 1 1 1 6
Fred 1 1 2 3
Barney 1 1 1 10
Barney 1 1 2 0
Fred 1 2 1 7
Fred 1 2 2 2
Barney 1 2 1 9
Barney 1 2 2 1
Fred 1 3 1 9
Fred 1 3 2 1
Barney 1 3 1 5
Barney 1 3 2 3
Fred 1 4 1 7
Fred 1 4 2 0
Barney 1 4 1 2
Barney 1 4 2 2
Fred 1 5 1 5
Fred 1 5 2 3
Barney 1 5 1 5
Barney 1 5 2 2
Fred 1 6 1 0
Fred 1 6 2 8
Barney 1 6 1 4
Barney 1 6 2 1
Fred 1 7 1 1
Fred 1 7 2 6
Barney 1 7 1 1
Barney 1 7 2 1
Fred 1 8 1 8
Fred 1 8 2 0
Barney 1 8 1 5
Barney 1 8 2 3
Fred 1 9 1 8
Fred 1 9 2 0
Barney 1 9 1 3
Barney 1 9 2 5
Fred 1 10 1 3
Fred 1 10 2 5
Fred 1 10 3 2
Barney 1 10 1 9
Barney 1 10 2 0
Barney 1 10 3 0
Fred 2 1 1 5
Fred 2 1 2 4
Barney 2 1 1 0
Barney 2 1 2 10
Fred 2 2 1 8
Fred 2 2 2 2
Barney 2 2 1 4
Barney 2 2 2 5
Fred 2 3 1 0
Fred 2 3 2 9
Barney 2 3 1 1
Barney 2 3 2 8
...... etc

Somehow I'm just not seeing how this would fit in a structured way in multi layered lists. I'm hoping it's straight forward and I'm just being thick, because this would definitely mitigate the lack of connectivity.
Although is there a finite list length and can you easily export the data into a csv or similar to archive it etc.

Many thanks again

Taifun

unread,
Dec 11, 2014, 2:06:00 PM12/11/14
to


Taifun

unread,
May 9, 2014, 6:54:55 PM5/9/14
to mitappinv...@googlegroups.com
alternatively you can add another dimension for the player,
in the example I just use a list of lists for each player...
Taifun
zog.aia

zogst...@googlemail.com

unread,
May 9, 2014, 7:03:54 PM5/9/14
to mitappinv...@googlegroups.com
Wow that really helps, many thanks - I'll have a play and make sure I can populate and read back the data ok.
A perfect example, thanks again

Zogsterjack

Gabriel Volonte

unread,
Dec 22, 2014, 3:21:00 PM12/22/14
to mitappinv...@googlegroups.com
Hi.

Thanks grate job.

How can I create it from a csv file?

Thanks

Taifun

unread,
Dec 22, 2014, 3:38:47 PM12/22/14
to mitappinv...@googlegroups.com
just use the list from csv table block to convert it into a list of lists
Taifun

Gabriel Volonte

unread,
Dec 23, 2014, 8:06:47 AM12/23/14
to mitappinv...@googlegroups.com
Thanks I will try.

Gabriel Volonte

unread,
Dec 23, 2014, 12:14:39 PM12/23/14
to mitappinv...@googlegroups.com

Hi,

this is bad? I cant stock here. (and is the beginning haha)


Enis

unread,
Dec 23, 2014, 12:18:21 PM12/23/14
to mitappinv...@googlegroups.com
That won't work... You're getting a list back from the CSV conversion, so you have to set the Label1.Text to the first element of the list, not the whole list.
____________________________________________________________________

http://twodogapps.com?page_id=686

For our App Inventor Tips, visit TwoDogApps.com by clicking here!


Gabriel Volonte

unread,
Dec 23, 2014, 12:57:41 PM12/23/14
to mitappinv...@googlegroups.com
Hi thanks Enis for yours comments.

I visit your website, grate job.!!

I made this 

to read this (in csv format file)









and what it shows is this in the label (the hole data base)

((id;name;surname;pohne)(1;aaa;xxx;456)(2;eee;yyy;789)(3;iii;zzz;112))

so:

what I  want is to look from a particular id the hole row. How can i do that...

Thank you


Taifun

unread,
Dec 23, 2014, 1:13:34 PM12/23/14
to mitappinv...@googlegroups.com
set global name to list from csv table get text



then use a for each in list loop and check the first item in each sublist for the id you are looking for
if you found it, then display the 2nd, 3rd and 4th item of the sublist as result
Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by Taifun.


Gabriel Volonte

unread,
Dec 23, 2014, 1:27:17 PM12/23/14
to mitappinv...@googlegroups.com


Thanks so much It works Grate!!!

I'm continue with the app !!! 


Reply all
Reply to author
Forward
0 new messages