The first step I do with this sort of thing is to get each row into an
array element (i.e. use the CR/LF as the delimiter to see where a row
ends). You can do this in one step with ListToArray().

Now you know how may rows you have - it's the length of the array. You
can loop over the array and treat each row as a list with commas as
you suggested yourself; if an email address is in the third list
position, append that row to a second array with ArrayAppend(). Then
you will have an array of the desired rows, over which you can loop
and insert into your DB.


On 2/10/06, dave <[EMAIL PROTECTED]> wrote:
> I'm having trouble parsing a list.
> Clients exports a TAB file from filemaker pro, which is uploaded and I chang 
> it to a txt file and replace the tabbed spaces with ",", so if i do cfloop 
> (list) over it i get an output like this:
>
>   Emmitt R,Barns, III,   tim,Douglas,[EMAIL PROTECTED]   Rick,Middletorn,   
> Dennis,Drieml,   David,Perky,   Brian,Wells,[EMAIL PROTECTED]
> Now I only want the rows that have an email attached to them.
> Now I can do a listlen and check if it has something in the 3 position 
> (email) and that the 3rd position is an email (see the first entry where the 
> 3rd position is not an email), then if thats met then delete all the rows 
> that dont have at least an email. and be ready to insert into db.
>
> any ideas?

--
CFAJAX docs and other useful articles:
http://jr-holmes.coldfusionjournal.com/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231869
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to