Page 1 of 1

Data records - sample stack

Posted: Wed Aug 26, 2015 5:48 am
by golive
Does anyone have a sample stack that displays data records on screen, with the ability to go Next, Previous, etc thru the records?

It would be very helpful to see sample code to help me get started.

If it uses arrays to show and update the data, even better.

Re: Data records - sample stack

Posted: Wed Aug 26, 2015 6:12 pm
by dunbarx
Hi.

"Data Records" are traditionally rows in a spreadsheet-like array, delimited with returns (tab-delimited-field, return-delimited-record).

But when you say "data records", do you envision a succession of cards, each with its own data, however that is displayed? Or do you mean some sort of list field or dataGrid, similar to a spreadsheet?

Craig Newman

Re: Data records - sample stack

Posted: Thu Aug 27, 2015 2:20 am
by golive
dunbarx wrote:Hi.

"Data Records" are traditionally rows in a spreadsheet-like array, delimited with returns (tab-delimited-field, return-delimited-record).

But when you say "data records", do you envision a succession of cards, each with its own data, however that is displayed? Or do you mean some sort of list field or dataGrid, similar to a spreadsheet?

Craig Newman
I want to start using a database, say SQLite or PostgreSQL or whatever.

It will have a table with lots of records (say customer details). It will display one record on a card.
Navigation buttons on the card will be the usual e.g. Next,Previous / First, Last / Find.
I want to see how to use buttons to navigate thru the records and show the data of another record.
So if the user clicks Next, the next person's details display on the card.

When the user finds a customer, say Sarah Williams, he can click on an Order details button and see the customer order details (another table), possibly in a grid.

I am looking for a sample stack that shows how to get started i.e. display and update data from a table.

Re: Data records - sample stack

Posted: Thu Aug 27, 2015 2:33 am
by Dixie
Look at this stack... it will get you started on your journey...
http://livecodeshare.runrev.com/stack/6 ... te-Sampler
http://lessons.runrev.com/s/lessons/m/4 ... e-database

at the same time read the 'revOpenDatabase' entry in the dictionary, as things have changed a little since this stack was written.

Re: Data records - sample stack

Posted: Mon Aug 31, 2015 11:51 am
by MaxV

Re: Data records - sample stack

Posted: Tue Sep 01, 2015 1:35 am
by golive
Thanks for all the suggestions. I am busy going thru them all.

If anyone has a stack with a Next/Previous button to display SQLite data records, please come forward :)