Data-Grid usage

J. Landman Gay jacque at
Sun Aug 4 20:01:08 CEST 2013

I think my proposed method will still work. When the user leaves the 
newly created card, set the name of the card to the data you want to 
represent it. That can be the name field, or whatever else you want the 
user to see. To avoid duplicates, append an ID or part of a description 
field or anything else appropriate to serve as the card name.

On preOpenCard in the index card, set the text of the list field to the 
cardnames of the stack.

On 8/3/13 11:13 AM, Vaughn Clement wrote:
> Hi All
> The project I am trying to develope is as follows:
> I created a stack where a user can edit normal fields and then I can either
> use the card id or a field as the reference field on the main stack card to
> send the user to whatever card they click on in the main card. It can be a
> list or a data grid or whatever control will work.
> The user adds a new card first. The user opens the new blank card with
> preset fields to add data. The entry is the key where the reference data
> (say the name field) is used to help the user locate that card that was
> added. When they return to the main card their (Name or additional data say
> card ID) is used to identify the card they want to view or edit later. This
> is like a list view of all cards in the stack for the user added data. It
> is an index system that adds a new card link on the main card every time a
> new card is added.
> NOTE: the reference cards need to feed the index list and not require the
> user to add the same data on the list view.
> Several years ago I did this in HyperCard but I don't recall how it was
> done.
> Thank you
> Vaughn Clement
> Apps by Vaughn Clement (Support)
> **
> Skype: vaughn.clement
> FaceTime: vclement at
> LogMeIn also avaialble
> Call on "ooVoo" at address:  vaughnclement or 9282549062
> Ph. 928-254-9062
> On Sat, Aug 3, 2013 at 8:15 AM, J. Landman Gay <jacque at>wrote:
>> On 8/2/13 1:26 PM, Vaughn Clement wrote:
>>> Hi
>>> (New to LiveCode)
>>> I would like to have a stack index or contents for each card where I
>>> determine the fields in the data-grid. I would also like to have a control
>>> in the row that would go to the card for the data in the row.
>> I agree with Craig that researching and following hints is a great way to
>> learn, but when you're really, really new, sometimes you need a little more
>> than that to get started without being too frustrated.
>> I would not use a datagrid for what you want, it's way overkill. All you
>> need is a simple list field. What you want to do is pretty common, here's
>> how I do it:
>> Name each card descriptively and uniquely. That is, name it with the same
>> string that should appear in the list.
>> On the index card that has the list field, you can populate the list in
>> one line of code:
>>     put the cardnames of this stack into field "listField" -- put the
>> actual name of the field in the quotes
>> Now you have automatic linkages, and all you need to do is script the
>> field to respond to a click:
>> on mouseUp
>>   put the clicktext into tCardName
>>   go card tCardName
>> end mouseUp
>> This can be further reduced to a single line:
>>    go card (the clicktext)
>> Normally the clicktext returns only the word under the mouse, but in a
>> list field it returns the entire line. That's why this works.
>> If your stack is static and no cards are ever removed or added, you can
>> put the cardnames into the list field once from the message box during
>> development and forget about it. If the cards will change, then you'd want
>> to execute that statement in a preOpenCard handler in the card script so
>> that it will update every time the card opens.
>> I now return you to generic hint mode. :)
>> --
>> Jacqueline Landman Gay         |     jacque at
>> HyperActive Software           |
>> ______________________________**_________________
>> use-livecode mailing list
>> use-livecode at
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

Jacqueline Landman Gay         |     jacque at
HyperActive Software           |

More information about the use-livecode mailing list