Re: Search a multidimensional array

2018-04-20 Thread Andrew Bell via use-livecode
THANK YOU for the recommendation! It took 4 seconds to convert this giant array to an SQLlite DB that could be queried in a heartbeat. You just took this project from proof of concept to prototype. My apologies to the list, I vaguely remember seeing that thread but didn't recall the title o

Re: Search a multidimensional array

2018-04-20 Thread MWCM via use-livecode
I tried to be a good developer and search the list before posting: multidimensional array search turned up some posts from 2014 but most “sort array” searches only returned single dimensional array options. I just started using encodedArrays on a recent project and fell in love with the simpli

Re: Search a multidimensional array

2018-04-20 Thread Alex Tweedly via use-livecode
On 20/04/2018 20:15, Richard Gaskin via use-livecode wrote: This is an interesting problem, Andrew.  Thanks for posting it. Indeed! One modest performance gain available easily may be to change this:   repeat for each element tThisItem in tInventoryArray if tThisItem["description"]

Re: Search a multidimensional array

2018-04-20 Thread Richard Gaskin via use-livecode
This is an interesting problem, Andrew. Thanks for posting it. One modest performance gain available easily may be to change this: repeat for each element tThisItem in tInventoryArray if tThisItem["description"] contains tSearchQuery then put tThisItem into tSortedInvento

Re: Search a multidimensional array

2018-04-20 Thread Bob Sneidar via use-livecode
Andrew, you don't peruse this list much, do you? :-) A recent thread has been going on about just this issue. The upshot is that one pass through the array is obviously needed for the sqLite conversion, but after that multiple queries can be done much more efficiently. I have code already writt

Search a multidimensional array

2018-04-20 Thread Andrew Bell via use-livecode
Is there a quick way to search a large multidimensional array that I am missing? I'm working on an inventory system and trying to figure out some more efficient methods. Currently I'm taking a tab-delimited spreadsheet provided by the client and converting it to an array, but there are curr