Trying to get into Fusebox and ran into a roadblock when I tried to extent the simple search using more than the attribute "nm" in the demo.

I created an advanced search div that looked for more than just a name - including check boxes that could create arrays. I could create my own version of A4D.Web.collectionItemsToQuery, but since we have to deal with the possibility of arrays in _form or _query (or $attributes), why not change the "for" loop from:

        for ($i; 1; $count)
$query := build query string($inSwitches + $query; $items{$i}; $inCollection{$items{$i}})
        end for



to something like:

        for ($i; 1; $count)
                if (not(is array(type($inCollection{$items{$i}}))))     
$query := build query string($inSwitches + $query; $items{$i}; $inCollection{$items{$i}})
                else
                        for ( $j; 1; size of array($inCollection{$items{$i}}))
$query := build query string($inSwitches + $query; $items{$i}; $inCollection{$items{$i}}{$j})
                        end for
                end if
        end for

Steve Alex
AIDT
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to