List to Columns

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

List to Columns

Detlef Hebbel-2
Hello.

Lasso 8.1

I currently display a list from 120 records, row by row.

Is there an easy way to display the records in columns, let say 4 columns?
So each column displays 30 rows ...

Any help would be appreciated.

Cheers

Detlef



------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: List to Columns

m i l e s-4
Detlef,

Yes.

++++++++++++++++++++++++++++++

<tr>
     [records]
       
        <td>some content</td>
                                                                       
  [If: (Loop_Count % 4) == 0]
  </tr>
  <tr>
  [/If]
     [/Records]
  </tr>

M i l e s.

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: List to Columns

Bil Corry
In reply to this post by Detlef Hebbel-2
Detlef Hebbel wrote:
> I currently display a list from 120 records, row by row.
>
> Is there an easy way to display the records in columns, let say 4 columns?
> So each column displays 30 rows ...

Yes:

http://tagswap.net/lp_array_columns


- Bil


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: List to Columns

Detlef Hebbel-2
In reply to this post by Detlef Hebbel-2
Thanks Miles.

Detlef


on 3/5/06 10:22 AM, m i l e s at [hidden email] wrote:

> Detlef,
>
> Yes.
>
> ++++++++++++++++++++++++++++++
>
> <tr>
>      [records]
>
> <td>some content</td>        
>
>   [If: (Loop_Count % 4) == 0]
>   </tr>
>   <tr>
>   [/If]
>      [/Records]
>   </tr>
>
> M i l e s.
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:
> http://www.listsearch.com/lassotalk.lasso?manage
>



------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: List to Columns

m i l e s-4
In reply to this post by Detlef Hebbel-2
Detlef,

Actually Bil's toy at tagswap is MUCH more user configurable.

Nice Bil.

Thanks for releasing that.

M i l e s.

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: List to Columns

Detlef Hebbel-2
In reply to this post by Detlef Hebbel-2
I guess that is the one:

http://www.tagswap.net/lp_array_columns

Detlef


on 3/5/06 10:35 AM, m i l e s at [hidden email] wrote:

> Detlef,
>
> Actually Bil's toy at tagswap is MUCH more user configurable.
>
> Nice Bil.
>
> Thanks for releasing that.
>
> M i l e s.
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:
> http://www.listsearch.com/lassotalk.lasso?manage
>



------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: List to Columns

Bil Corry
In reply to this post by Detlef Hebbel-2
m i l e s wrote:
> Actually Bil's toy at tagswap is MUCH more user configurable.
>
> Nice Bil.
>
> Thanks for releasing that.

It's especially handy when you want to the change the directional flow of the records:

-horizontal

        1 2 3
        4 5 6
        7 8 9

-vertical

        1 4 7
        2 5 8
        3 6 9


and you can make the number of columns fixed, or the number of rows, or both, or neither.


- Bil


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: List to Columns

Detlef Hebbel-2
In reply to this post by Detlef Hebbel-2
Miles:

There was a'<br>' missing:  (that reminds me of swapping cooking recipes,
there's always one ingredient missing :) ...)

> <tr>
>      [records]
>
> <td>some content</td>
>
>   [If: (Loop_Count % 4) == 0]

<br>

>   </tr>
>   <tr>
>   [/If]
>      [/Records]
>   </tr>


Working fine for me now!


Thanks Miles. Great help.
Detlef





on 3/5/06 10:22 AM, m i l e s at [hidden email] wrote:

> Detlef,
>
> Yes.
>
> ++++++++++++++++++++++++++++++
>
> <tr>
>      [records]
>
> <td>some content</td>        
>
>   [If: (Loop_Count % 4) == 0]
>   </tr>
>   <tr>
>   [/If]
>      [/Records]
>   </tr>
>
> M i l e s.
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:
> http://www.listsearch.com/lassotalk.lasso?manage
>



------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: List to Columns

Bil Corry
In reply to this post by Detlef Hebbel-2
Detlef Hebbel wrote:
> I guess that is the one:
>
> http://www.tagswap.net/lp_array_columns

Yep!

Here's an example using an inline and table:

        var:'sql' = "
                SELECT
                        firstname,
                        lastname
                FROM
                        contacts
                ORDER BY
                        lastname,
                        firstname
                LIMIT 20
                ";

        inline: $db, -sql=$sql;
                var:'display' = (lp_array_columns: records_array, -maxcols=3, -vert, -empty=(array: null, null));
        /inline;

       
        '<table border="1">';
        iterate: $display, local:'row';
                '<tr>';
                iterate: #row, local:'cell';
                                '<td>' (#cell->(get:1)) ' ' (#cell->(get:2)) '</td>';
                /iterate;
                '</tr>';
        /iterate;
        '</table>';


That returns:

        A Test H Test O Test
        B Test I Test P Test
        C Test J Test Q Test
        D Test K Demo R Test
        E Test L Demo S Test
        F Test M Test T Test
        G Test N Test


- Bil


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: List to Columns

Steven Evans
Hi Bil...

First off, thanks for this tag...I am working on a gallery and it is
proving to be very helpful.

I have it successfully working with one field in the array, but am
struggling to get a second field working.  For example:


inline: -database='workorder', -table='images', -username='msiweb',
-password='webmsi', 'scroller'='yes', -search;
        Variable: 'array'=(array);
        Variable: 'array_id'=(array);
        records;
                $array->(Insert: (field:'scroller_path'), (field:'id');
        /records;
/inline;
var:'display' = (lp_array_columns: $array, -maxcols=4, -horizontal,
-empty=(array: null));
        '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
        iterate: $display, local:'row'; '<tr>';
                        iterate: #row, local:'cell';
                        '<td align="center" valign="middle" width="186" height="119"
background="/msi/images/photo-background.gif"><a
href="image_detail.lasso?id=' (#cell->(get:2)) '"><img
src="http://admin.msiprod.com' + (#cell) + '" alt="" height="105"
width="140" border="0"></a></td>';
                                                                                                                        if: (loop_count) < 4;
                                '<td align="center" valign="middle" width="12"></td>';
                        /if;
                        /iterate; '</tr>'; /iterate;
   '</table>';
                                                                                               
I know my problem is with the array, I am just struggling to get the
array to hold the URL and the ID.  I want to use the id to help me find
the bigger image on my image detail page.

Thanks for your help!

sqe

(LP8.5, OSX, Apache)


On May 2, 2006, at 4:12 PM, Bil Corry wrote:

> Detlef Hebbel wrote:
>> I guess that is the one:
>> http://www.tagswap.net/lp_array_columns
>
> Yep!
>
> Here's an example using an inline and table:
>
> var:'sql' = "
> SELECT
> firstname,
> lastname
> FROM
> contacts
> ORDER BY
> lastname,
> firstname
> LIMIT 20
> ";
>
> inline: $db, -sql=$sql;
> var:'display' = (lp_array_columns: records_array, -maxcols=3, -vert,
> -empty=(array: null, null));
> /inline;
>
>
> '<table border="1">';
> iterate: $display, local:'row';
> '<tr>';
> iterate: #row, local:'cell';
> '<td>' (#cell->(get:1)) ' ' (#cell->(get:2)) '</td>';
> /iterate;
> '</tr>';
> /iterate;
> '</table>';
>
>
> That returns:
>
> A Test H Test O Test
> B Test I Test P Test
> C Test J Test Q Test
> D Test K Demo R Test
> E Test L Demo S Test
> F Test M Test T Test
> G Test N Test
>
>
> - Bil
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:  
> http://www.listsearch.com/lassotalk.lasso?manage
>
>
Steven Q. Evans
Director of Technological Resources
MSI Productions
(858)344-3351 • (858)348-0629 • (707)215-1032 Fax • [hidden email]


------------------------------
LASSO MASTER CLASS - Orlando, FL
Following the FileMaker Developer Conference
2 Day intensive seminar: Learn the best way to get your FileMaker data on the web.
http://www.briandunning.com/lasso-training/


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: List to Columns

Doug Gentry
When I need to pass two items in an array, I build the array like this:

var: 'temp'= (field: 'scroller_path') +'|'+ (field: 'id');
$array->(Insert: $temp);

Where each item in the array has two values, separated by the  
vertical pipe. Then when I retrieve them I do this:

var: 'tempitem'=(array);
iterate: $array, local: 'item';
var: 'tempitem'=#item->(split: '|')

--To show path:  $tempitem->(get: 1)

--To show id:  $tempitem->(get: 2)
/iterate;

Now what I don't know how to do is integrate this will Bil's (?)  
lp_array_columns, but I bet the solution is close.

....Doug


On Aug 18, 2006, at 11:16 AM, Steven Q. Evans wrote:

> Hi Bil...
>
> First off, thanks for this tag...I am working on a gallery and it  
> is proving to be very helpful.
>
> I have it successfully working with one field in the array, but am  
> struggling to get a second field working.  For example:
>
>
> inline: -database='workorder', -table='images', -username='msiweb',  
> -password='webmsi', 'scroller'='yes', -search;
> Variable: 'array'=(array);
> Variable: 'array_id'=(array);
> records;
> $array->(Insert: (field:'scroller_path'), (field:'id');
> /records;
> /inline;
> var:'display' = (lp_array_columns: $array, -maxcols=4, -horizontal,  
> -empty=(array: null));
> '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
> iterate: $display, local:'row'; '<tr>';
> iterate: #row, local:'cell';
> '<td align="center" valign="middle" width="186" height="119"  
> background="/msi/images/photo-background.gif"><a  
> href="image_detail.lasso?id=' (#cell->(get:2)) '"><img src="http://
> admin.msiprod.com' + (#cell) + '" alt="" height="105" width="140"  
> border="0"></a></td>';
> if: (loop_count) < 4;
> '<td align="center" valign="middle" width="12"></td>';
> /if;
> /iterate; '</tr>'; /iterate;
>   '</table>';
>
> I know my problem is with the array, I am just struggling to get  
> the array to hold the URL and the ID.  I want to use the id to help  
> me find the bigger image on my image detail page.
>
> Thanks for your help!
>
> sqe
>
> (LP8.5, OSX, Apache)
>
>
> On May 2, 2006, at 4:12 PM, Bil Corry wrote:
>
>> Detlef Hebbel wrote:
>>> I guess that is the one:
>>> http://www.tagswap.net/lp_array_columns
>>
>> Yep!
>>
>> Here's an example using an inline and table:
>>
>> var:'sql' = "
>> SELECT
>> firstname,
>> lastname
>> FROM
>> contacts
>> ORDER BY
>> lastname,
>> firstname
>> LIMIT 20
>> ";
>>
>> inline: $db, -sql=$sql;
>> var:'display' = (lp_array_columns: records_array, -maxcols=3, -
>> vert, -empty=(array: null, null));
>> /inline;
>>
>>
>> '<table border="1">';
>> iterate: $display, local:'row';
>> '<tr>';
>> iterate: #row, local:'cell';
>> '<td>' (#cell->(get:1)) ' ' (#cell->(get:2)) '</td>';
>> /iterate;
>> '</tr>';
>> /iterate;
>> '</table>';
>>
>>
>> That returns:
>>
>> A Test H Test O Test
>> B Test I Test P Test
>> C Test J Test Q Test
>> D Test K Demo R Test
>> E Test L Demo S Test
>> F Test M Test T Test
>> G Test N Test
>>
>>
>> - Bil
>>
>>
>> ------------------------------
>> Lasso Support: http://support.omnipilot.com/
>> Search the list archives: http://www.listsearch.com/lassotalk.lasso
>> Manage your list subscription:  http://www.listsearch.com/ 
>> lassotalk.lasso?manage
>>
>>
> Steven Q. Evans
> Director of Technological Resources
> MSI Productions
> (858)344-3351 • (858)348-0629 • (707)215-1032 Fax •  
> [hidden email]
>
>
> ------------------------------
> LASSO MASTER CLASS - Orlando, FL
> Following the FileMaker Developer Conference
> 2 Day intensive seminar: Learn the best way to get your FileMaker  
> data on the web.
> http://www.briandunning.com/lasso-training/
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:  http://www.listsearch.com/ 
> lassotalk.lasso?manage



---
Doug Gentry
Dynapolis & Southern Oregon University
p:  541-261-8501 / Toll Free: 888-490-0644
[hidden email]
www.dynapolis.com



------------------------------
LASSO MASTER CLASS - Orlando, FL
Following the FileMaker Developer Conference
2 Day intensive seminar: Learn the best way to get your FileMaker data on the web.
http://www.briandunning.com/lasso-training/


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: List to Columns

Bil Corry
In reply to this post by Steven Evans
To hold multiple values, you'll need an array, which then you store into an array.  So build your array of arrays like so:

 $array->(Insert: (array: (field:'scroller_path'), (field:'id')));

- Bil


Steven Q. Evans wrote:

> Hi Bil...
>
> First off, thanks for this tag...I am working on a gallery and it is
> proving to be very helpful.
>
> I have it successfully working with one field in the array, but am
> struggling to get a second field working.  For example:
>
>
> inline: -database='workorder', -table='images', -username='msiweb',
> -password='webmsi', 'scroller'='yes', -search;
>     Variable: 'array'=(array);
>     Variable: 'array_id'=(array);
>     records;
>         $array->(Insert: (field:'scroller_path'), (field:'id');
>     /records;
> /inline;
> var:'display' = (lp_array_columns: $array, -maxcols=4, -horizontal,
> -empty=(array: null));
>     '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
>     iterate: $display, local:'row';                                '<tr>';
>             iterate: #row, local:'cell';
>             '<td align="center" valign="middle" width="186" height="119"
> background="/msi/images/photo-background.gif"><a
> href="image_detail.lasso?id=' (#cell->(get:2)) '"><img
> src="http://admin.msiprod.com' + (#cell) + '" alt="" height="105"
> width="140" border="0"></a></td>';
>                                                             if:
> (loop_count) < 4;
>                 '<td align="center" valign="middle" width="12"></td>';
>             /if;
>             /iterate;                                        
> '</tr>';                                        /iterate;
>   '</table>';
>                                                
> I know my problem is with the array, I am just struggling to get the
> array to hold the URL and the ID.  I want to use the id to help me find
> the bigger image on my image detail page.
>
> Thanks for your help!
>
> sqe
>
> (LP8.5, OSX, Apache)
>
>
> On May 2, 2006, at 4:12 PM, Bil Corry wrote:
>
>> Detlef Hebbel wrote:
>>> I guess that is the one:
>>> http://www.tagswap.net/lp_array_columns
>>
>> Yep!
>>
>> Here's an example using an inline and table:
>>
>>     var:'sql' = "
>>         SELECT
>>             firstname,
>>             lastname
>>         FROM
>>             contacts
>>         ORDER BY
>>             lastname,
>>             firstname
>>         LIMIT 20
>>         ";
>>
>>     inline: $db, -sql=$sql;
>>         var:'display' = (lp_array_columns: records_array, -maxcols=3,
>> -vert, -empty=(array: null, null));
>>     /inline;
>>
>>    
>>     '<table border="1">';
>>     iterate: $display, local:'row';
>>         '<tr>';
>>         iterate: #row, local:'cell';
>>                 '<td>' (#cell->(get:1)) ' ' (#cell->(get:2)) '</td>';
>>         /iterate;
>>         '</tr>';
>>     /iterate;
>>     '</table>';
>>
>>
>> That returns:
>>
>>     A Test    H Test    O Test  
>>     B Test    I Test    P Test  
>>     C Test    J Test    Q Test  
>>     D Test    K Demo    R Test  
>>     E Test    L Demo    S Test  
>>     F Test    M Test    T Test  
>>     G Test    N Test  
>>
>>
>> - Bil
>>
>>
>> ------------------------------
>> Lasso Support: http://support.omnipilot.com/
>> Search the list archives: http://www.listsearch.com/lassotalk.lasso
>> Manage your list subscription:  
>> http://www.listsearch.com/lassotalk.lasso?manage
>>
>>
> Steven Q. Evans
> Director of Technological Resources
> MSI Productions
> (858)344-3351 • (858)348-0629 • (707)215-1032 Fax • [hidden email]
>
>
> ------------------------------
> LASSO MASTER CLASS - Orlando, FL
> Following the FileMaker Developer Conference
> 2 Day intensive seminar: Learn the best way to get your FileMaker data
> on the web.
> http://www.briandunning.com/lasso-training/
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:  
> http://www.listsearch.com/lassotalk.lasso?manage
>




------------------------------
LASSO MASTER CLASS - Orlando, FL
Following the FileMaker Developer Conference
2 Day intensive seminar: Learn the best way to get your FileMaker data on the web.
http://www.briandunning.com/lasso-training/


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage