Search in arrays

tkuypers at telenet.be tkuypers at telenet.be
Wed Dec 9 08:11:14 EST 2015


Hi Mark,

Either I don’t understand this, or I didn’t explain it correctly…
gArray contains app. 10.000 lines of data
Item 1 is a unique ID
Item 2 contains the supplier
Item 3 contains the main group
Item 4 contains subgroup 1
Item 5 contains subgroup 2
Item 6 contains subgroup 3
Item 7 contains subgroup 4
Item 8 contains subgroup 5
Item 9-15 contains productinfo

I filled a list field with the keys of item 3
When I click on an item in that list, I would like to see a second list filled with the keys belonging to the clicked item.

So when I understand your code, this should be:
on mouseUp
 	put gArray[the selectedText of field “Maingroup"] into field “Subgroup"
end mouseUp
But this doesn’t do anything…

What am I missing?


Met vriendelijke groeten,
Warm Regards,



Ton Kuypers
+32 (0) 477 739 530

Steenweg op Leopoldsburg 100 • B-2490 • Balen • Belgium
www.publishingtools4u.com




> On 9 dec. 2015, at 13:24, Mark Schonewille <m.schonewille at economy-x-talk.com> wrote:
> 
> Hi Ton,
> 
> global gArray
> on mouseUp
>  put gArray[the selectedText of field 1][the selectedText of field 2][the selectedText of field 3] into field 4
> end mouseUp
> 
> (mind line wraps)
> 
> Kind regards,
> 
> Mark Schonewille
> http://economy-x-talk.com
> https://www.facebook.com/marksch
> 
> Buy the most extensive book on the
> LiveCode language:
> http://livecodebeginner.economy-x-talk.com
> 
> Op 12/9/2015 om 10:49 schreef tkuypers at telenet.be:
>> Hi,
>> 
>> I know the following should be possible, but I’m nut used in working with arrays so some help is highly appreciated…
>> 
>> I have a field containing around 10.000 lines of tab-separated text.
>> The first item is a unique ID, row 2 contains the main group, row 3 to 5 contain subgroups and row 6 to 15 contain product info.
>> 
>> I converted this data to an array and are able to get the keys of the main group. These are shown to the user in a list field.
>> But when the user clicks on an item in this field, the next field should show the keys of the first subgroup, belonging to the selected main group.
>> 
>> And this for all the subgroups afterwards, to refine the selection of products.
>> 
>> But I have no idea how to filter this array on the selected key…
>> 
>> 
>> Met vriendelijke groeten,
>> Warm Regards,
>> 
>> 
>> 
>> Ton Kuypers
>> +32 (0) 477 739 530
>> 
>> Steenweg op Leopoldsburg 100 • B-2490 • Balen • Belgium
>> www.publishingtools4u.com
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list