How to create spreadsheet-like data entry form

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
JEfromCanada
Posts: 7
Joined: Wed Jul 07, 2010 1:43 am

How to create spreadsheet-like data entry form

Post by JEfromCanada » Fri Jul 09, 2010 2:11 am

What I want to do is create a multi-record data entry card (each row is a record), where user-editable data is presented in tabular form, but with each column of the table being able to use customized data entry techniques (like a dropdown list for one column, and a radio button group for another column).

I tried creating a data grid, but that appears to be more for displaying data than entering data.

I then tried a table, which allows data entry, but I can't find a way to customize the data types and widgets on a column-by-column basis.

So, what do I need to do in Revolution to have a multi-record data entry capability, with each column having a different data type and widget.

For example, I want one column to be a date field, one column to be a dropdown list selection, one column to be a currency amount (dollars and cents), etc.

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm
Location: Oklahoma, USA

Re: How to create spreadsheet-like data entry form

Post by doc » Fri Jul 09, 2010 12:00 pm

Hello,
Perhaps you should take a look at these two third party libraries:

RunRevPlanet Grid Stack
http://www.runrevplanet.com/

ListMagic
http://www.sosmartsoftware.com/?r=revolution&l=en

Both are very inexpensive and have large feature sets, including at least a portion of what you are asking for.

HTH,
-Doc-

edgore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 197
Joined: Wed Jun 14, 2006 8:40 pm

Re: How to create spreadsheet-like data entry form

Post by edgore » Fri Jul 09, 2010 4:03 pm

Does anyone have a recommendation between the two? I am also looking for something like this, and with Gridstack half off for the next few days I am very tempted to get on or the other.

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm
Location: Oklahoma, USA

Re: How to create spreadsheet-like data entry form

Post by doc » Fri Jul 09, 2010 5:43 pm

I haven't yet registered either one, but have used ListMagic a bit primarily to see how well the check-box functions work (great!). I found it very well documented and easy to use.

As for Grid Stack, I just did a very short trial, but really don't recall many of the specific details... it too though, is very well documented.

I'd suggest that you try out the demo version for each, read up on the documentation and form your own opinion as to how they might fit your needs. One thing is for certain though... they are time savers! I cannot begin to imagine the complexity and time it took to develop either product. Surely a bargain if you need and/or can use them.

-Doc-

JEfromCanada
Posts: 7
Joined: Wed Jul 07, 2010 1:43 am

Re: How to create spreadsheet-like data entry form

Post by JEfromCanada » Fri Jul 09, 2010 6:54 pm

I was surprised to see that something like this requires a third party plugin, and even with that, the full functionality I require may not be available!

Since I got the RunRevPlanet email about their sale, I'll have to check out their offering, but it's disappointing that I need to spend even more so soon after starting to use Revolution.

Zryip TheSlug
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 163
Joined: Tue Jan 26, 2010 10:15 pm
Contact:

Re: How to create spreadsheet-like data entry form

Post by Zryip TheSlug » Fri Jul 09, 2010 9:27 pm

Hi JEFromCanada,
JEfromCanada wrote:What I want to do is create a multi-record data entry card (each row is a record), where user-editable data is presented in tabular form, but with each column of the table being able to use customized data entry techniques (like a dropdown list for one column, and a radio button group for another column).

I tried creating a data grid, but that appears to be more for displaying data than entering data.

I then tried a table, which allows data entry, but I can't find a way to customize the data types and widgets on a column-by-column basis.

So, what do I need to do in Revolution to have a multi-record data entry capability, with each column having a different data type and widget.

For example, I want one column to be a date field, one column to be a dropdown list selection, one column to be a currency amount (dollars and cents), etc.
In the Data Grid object you can display dropdown list or buttons in a column.You have to define templates for your columns for doing that.
I'm actually working in a tool I named the Data Grid Helper and I'm using those techniques to build it.

Have a look to this page to give you an idea what it possible to do with the Data Grid object from Revolution.
Note that the left part of the Data Grid Helper is a tree, made with a Data Grid Object with a customize template and a customize behavior.

The main link:
http://www.aslugontheroad.co.cc/index.p ... &Itemid=64

Some screen shots:
http://www.aslugontheroad.co.cc/images/ ... Editor.png
http://www.aslugontheroad.co.cc/images/ ... PLArea.png


Regards,
TheSlug
http://www.aslugontheroad.com - Tutorials, demo stacks and plugins for LiveCode
Data Grid Helper - An intuitive interface for building LiveCode's Data Grids
Excel Library- Extends the LiveCode language for controlling MS Excel

JEfromCanada
Posts: 7
Joined: Wed Jul 07, 2010 1:43 am

Re: How to create spreadsheet-like data entry form

Post by JEfromCanada » Mon Jul 12, 2010 6:37 am

Zryip TheSlug wrote: In the Data Grid object you can display dropdown list or buttons
Correct me if I'm wrong, but the datagrid seems designed only to DISPLAY some pre-determined data (however it is initialized). I can't find anything that indicates that the datagrid contents are editable at runtime. Am I correct that the datagrid does not allow the interactive editing of contents?

It is the interactive editing that I require.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9663
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: How to create spreadsheet-like data entry form

Post by dunbarx » Mon Jul 12, 2010 8:32 pm

I am a newbie with datagrids, but I know you can do anything you want with them. The simplest thing is to edit their contents, either manually or under script control. Is that what you are asking?

And there is no limit to customizing them. Make one and play around. Check out:

http://revolution.screenstepslive.com/s ... s/datagrid

Craig Newman

Zryip TheSlug
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 163
Joined: Tue Jan 26, 2010 10:15 pm
Contact:

Re: How to create spreadsheet-like data entry form

Post by Zryip TheSlug » Mon Jul 12, 2010 11:29 pm

JEfromCanada wrote:Correct me if I'm wrong, but the datagrid seems designed only to DISPLAY some pre-determined data (however it is initialized). I can't find anything that indicates that the datagrid contents are editable at runtime. Am I correct that the datagrid does not allow the interactive editing of contents?
You're wrong, so I correct you ;)

In a datagrid template you can define all the objects you need, and in the datagrid behavior of a column or a row, define what action an object will do in the row.
In a Datagrid form template, you can draw for example 3 radios buttons and managed their actions in the template behavior of a row.

In the template behavior you will have two main handlers events

- A mouseUp button with some action code:

Code: Select all

on mouseUp
   put the short name of the target into tTheBtnName
   switch tTheBtnName
      case "MyRadio1"
          doSomething
          put 1 into tBtnClick
      case "MyRadio2"
          doSomething
          put 2 into tBtnClick
      case "MyRadio3"
          doSomething
          put 3 into tBtnClick
    end switch
    storeValueInDG tBtnClick -- handler to store the value of the selected radio button in the dg data
end mouseUp
- A fillIndata event. This event displays the data in the datagrid row

Code: Select all

on fillindata pDataArray
   put pDataArray["checkboxvalue"] into the tCheckBoxValue
   if (tCheckBoxValue is 1) then
        set the hilite of btn "MyRadio1" of me to true
   else if (tCheckBoxValue is 2) then
        set the hilite of btn "MyRadio2" of me to true
   else if (tCheckBoxValue is 3) then
        set the hilite of btn "MyRadio2" of me to true
   else
       answer "Error"
   end if 
 
  -- Display data of others controls in the same row

end fillindata
I invite you to watch the video named "The Column builder in action" in my site:
http://www.aslugontheroad.co.cc/index.p ... &Itemid=64

In this video you see me playing with a menu button in a DG to set the parameters of another DG.

I invite you also to download this tutorial stack about datagrid, to have a better understanding how a datagrid works:
http://www.aslugontheroad.co.cc/index.p ... &Itemid=63

[Edit by the author to move a part of the anwer to the right post]
TheSlug
http://www.aslugontheroad.com - Tutorials, demo stacks and plugins for LiveCode
Data Grid Helper - An intuitive interface for building LiveCode's Data Grids
Excel Library- Extends the LiveCode language for controlling MS Excel

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”