Can you use a | instead of a , to separate your lists? It seems too
confusing visually to read yet alone trying to parse it.
<cfset i = 0>
<cfloop list="#mylist#" item="i">
<cfset i = i + 1>
<!--- is this the third record? --->
<cfif i MOD 3 EQ 0 AND NOT isValid("email", ListGetAt(mylist, i, "|"))>
<!--- do delete here or append ID or whatever to an array and loop array for
deletes (i don't suggest that though...do it all in 1 loop) --->
</cfif>
</cfloop>
I could be looking at your problem wrong so my apologies if so. This
basically loops your list and checks every 3rd item against the isValid
function. If it fails, do the delete. If not, move on.
On 2/9/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 to db.
>
> any ideas?
>
> ~Dave the disruptor~
> I forgot what I was gunna put here, Will woulda stole it anyways!
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231868
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54