[cfaussie] Re: Quick List question

2008-09-10 Thread Steve Onnis
: [cfaussie] Re: Quick List question Andrew, I'm curious is it just the ListGetAt(position) function that's the grief? it might be broken itself I wonder if all list functions are similarly broken: if you convert your list to an array with ListToArray(list) first would you get the correct 4 items

[cfaussie] Re: Quick List question

2008-09-10 Thread Andrew Scott
: [cfaussie] Re: Quick List question Andrew, I'm curious is it just the ListGetAt(position) function that's the grief? it might be broken itself I wonder if all list functions are similarly broken: if you convert your list to an array with ListToArray(list) first would you get the correct 4 items

[cfaussie] Re: Quick List question

2008-09-10 Thread Steve Onnis
- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Scott Sent: Wednesday, 10 September 2008 4:03 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question Nope all list functions. I have opened the discussion in an area that can't be named, so I

[cfaussie] Re: Quick List question

2008-09-10 Thread Andrew Scott
. www.aegeon.com.au Phone: +613 9015 8628 Mobile: 0404 998 273 -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steve Onnis Sent: Wednesday, 10 September 2008 4:04 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question Why don't you put

[cfaussie] Re: Quick List question

2008-09-10 Thread phaddon
On Wed, Sep 10, 2008 at 01:45:46PM +0800, Brett Payne-Rhodes wrote: I don't think list processing is clever enough to say Ignore delimiters that are inside double quotes so it treats the comma inside your 'third' element as a valid delimiter. You might have to run a clever bit of regex

[cfaussie] Re: Quick List question

2008-09-10 Thread Steve Onnis
into a nightmare for yourself. Steve -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Scott Sent: Wednesday, 10 September 2008 4:18 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question Ok first of all this is a one

[cfaussie] Re: Quick List question

2008-09-10 Thread Andrew Scott
] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, 10 September 2008 4:19 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question On Wed, Sep 10, 2008 at 01:45:46PM +0800, Brett Payne-Rhodes wrote: I don't think list processing is clever enough to say Ignore delimiters

[cfaussie] Re: Quick List question

2008-09-10 Thread Andrew Scott
4:18 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question Its not broken You define a character as a delimiter and it breaks the list up into items separated by that character. CF doesn't know it's a CSV formatted string, and why would it care? Its doing what you tell

[cfaussie] Re: Quick List question

2008-09-10 Thread Andrew Scott
- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steve Onnis Sent: Wednesday, 10 September 2008 4:23 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question Do a CFHTTP, get it into a query recordset and loop over the query to rebuild your CSV. At least

[cfaussie] Re: Quick List question

2008-09-10 Thread Dale Fraser
[mailto:[EMAIL PROTECTED] On Behalf Of Andrew Scott Sent: Wednesday, 10 September 2008 3:21 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question Scott, Cheers but I don't see how that helps, I am aware of how empty lists are handled. The problem lies in this example List

[cfaussie] Re: Quick List question

2008-09-10 Thread Dale Fraser
@googlegroups.com Subject: [cfaussie] Re: Quick List question Nope all list functions. I have opened the discussion in an area that can't be named, so I will wait for what responses I get from there. I am curious why it has never been fixed? And to confirm it, yes all list functions do not work as expected

[cfaussie] Re: Quick List question

2008-09-10 Thread vendigo
Hi Andrew, Not sure if this works for your application but we've used this ColdFusion UDF before in a project for CSV parsing: http://www.bennadel.com/index.cfm?dax=blog:991.view It converts your file data into an array not a list, but at least it takes care of commas within quotes, and

[cfaussie] Re: Quick List question

2008-09-10 Thread Steve Onnis
To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question Steve, How do you get it to a query, when the list function is broken? Can you explain that more? However, I personally am not interested in a solution. It has been completed, it is something that I feel should work

[cfaussie] Re: Quick List question

2008-09-10 Thread Brett Payne-Rhodes
Thanks Steve, I'll admit that I didn't know that. Could be very useful... Cheers, Brett B) Steve Onnis wrote: You didn't know that cfhttp url=csvfile.txt name=csvQry/cfhttp ...will return to you a query object based on the csv data in the file? Try this for an example. Just

[cfaussie] Re: Quick List question

2008-09-10 Thread Andrew Scott
. www.aegeon.com.au Phone: +613 9015 8628 Mobile: 0404 998 273 -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steve Onnis Sent: Wednesday, 10 September 2008 4:41 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question You didn't know

[cfaussie] Re: Quick List question

2008-09-10 Thread Andrew Scott
PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question You didn't know that cfhttp url=csvfile.txt name=csvQry/cfhttp ...will return to you a query object based on the csv data in the file? Try this for an example. Just save it to a file and run it. cfsetting

[cfaussie] Re: Quick List question

2008-09-10 Thread Zac Spitzer
: +613 9015 8628 Mobile: 0404 998 273 -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steve Onnis Sent: Wednesday, 10 September 2008 4:41 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question You didn't know

[cfaussie] Re: Quick List question

2008-09-10 Thread Andrew Scott
September 2008 5:19 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question why not just grab an existing java lib which supports CSV? like http://supercsv.sourceforge.net/ or something? On Wed, Sep 10, 2008 at 5:15 PM, Andrew Scott [EMAIL PROTECTED] wrote: Ok that doesn't

[cfaussie] Re: Quick List question

2008-09-10 Thread Steve Onnis
@googlegroups.com Subject: [cfaussie] Re: Quick List question Ok that doesn't work for me. -- Senior Coldfusion Developer Aegeon Pty. Ltd. www.aegeon.com.au Phone: +613 9015 8628 Mobile: 0404 998 273 -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf

[cfaussie] Re: Quick List question

2008-09-10 Thread Andrew Scott
[mailto:[EMAIL PROTECTED] On Behalf Of Steve Onnis Sent: Wednesday, 10 September 2008 5:22 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question Did you make sure you fixed the lines up ? The email wrapped some of the lines of code :) Also that was done quickly on CF8

[cfaussie] Re: Quick List question

2008-09-10 Thread Steve Onnis
That's an example of the tag The CODE is below that -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Scott Sent: Wednesday, 10 September 2008 5:28 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question Yeah I

[cfaussie] Re: Quick List question

2008-09-10 Thread CyberAngel
: Quick List question That's an example of the tag The CODE is below that -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Scott Sent: Wednesday, 10 September 2008 5:28 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List

[cfaussie] Re: Quick List question

2008-09-10 Thread CyberAngel
: Quick List question That's an example of the tag The CODE is below that -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Scott Sent: Wednesday, 10 September 2008 5:28 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List

[cfaussie] Re: Quick List question

2008-09-10 Thread Steve Onnis
The code is this cfsetting enablecfoutputonly=Yes showdebugoutput=No / cfif structKeyExists(URL, docsv) cfset csvdata = List Item ##1, List Item ##2, inner List Item ##1, inner List Item ##2, List Item ##4 / cfoutput#csvdata#/cfoutput cfelse cfhttp

[cfaussie] Re: Quick List question

2008-09-10 Thread Kym Kovan
CyberAngel wrote: Sorry, I tried that too, same result. Now that I am at home, I'll try it here as well. I tried this variation and it worked fine: cfif structKeyExists(URL, docsv) cfset csvdata = Col_1,Col_2,Col_3,Col_4chr(13)chr(10) / cfset csvdata = csvdata 'List Item ##1, List

[cfaussie] Re: Quick List question

2008-09-10 Thread Steve Onnis
@googlegroups.com Subject: [cfaussie] Re: Quick List question CyberAngel wrote: Sorry, I tried that too, same result. Now that I am at home, I'll try it here as well. I tried this variation and it worked fine: cfif structKeyExists(URL, docsv) cfset csvdata = Col_1,Col_2,Col_3,Col_4chr(13)chr(10

[cfaussie] Re: Quick List question

2008-09-10 Thread CyberAngel
. -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kym Kovan Sent: Wednesday, 10 September 2008 6:35 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question CyberAngel wrote: Sorry, I tried that too, same result. Now

[cfaussie] Re: Quick List question

2008-09-10 Thread CyberAngel
Sent: Wednesday, 10 September 2008 6:40 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question This is the file http://www.novahost.com.au/csv.cfm This is on CF8.0.1. I also checked it on CF6.1 and worked fine. -Original Message- From: cfaussie@googlegroups.com

[cfaussie] Re: Quick List question

2008-09-10 Thread CyberAngel
:40 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question This is the file http://www.novahost.com.au/csv.cfm This is on CF8.0.1. I also checked it on CF6.1 and worked fine. --~--~-~--~~~---~--~~ You received this message because you

[cfaussie] Re: Quick List question

2008-09-10 Thread CyberAngel
What's the best charset to use? -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steve Onnis Sent: Wednesday, 10 September 2008 6:40 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question This is the file http

[cfaussie] Re: Quick List question

2008-09-10 Thread CyberAngel
Ryan, Sorry I didn't see your post, that would have done the trick as well. -Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, 10 September 2008 4:36 PM To: cfaussie Subject: [cfaussie] Re: Quick List question

[cfaussie] Re: Quick List question

2008-09-09 Thread Barry Beattie
myfile = FileOpen(#ExpandPath(test.csv')#, read); andrew, is that a typo in the post or in the code as well? you've got (test.csv') with a closing single quote, but not open. Perhaps rewrite it to myfile = FileOpen( expandPath(test.csv), read ) to make sure

[cfaussie] Re: Quick List question

2008-09-09 Thread Scott Thornton
Hi Before reading .csv files, I typically try to find and replace any repeating delimiters because as you discovered, CF ( for me its 6.1 ) treats them as one delimiter and not two. eg replace two commas with the string comma space comma. cfset CSV_DATA_LINE = replace(CSV_DATA_LINE, ,,, , ,,

[cfaussie] Re: Quick List question

2008-09-09 Thread Andrew Scott
-Original Message- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Scott Thornton Sent: Wednesday, 10 September 2008 3:15 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question Hi Before reading .csv files, I typically try to find and replace any

[cfaussie] Re: Quick List question

2008-09-09 Thread Andrew Scott
:[EMAIL PROTECTED] On Behalf Of Barry Beattie Sent: Wednesday, 10 September 2008 3:12 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Quick List question myfile = FileOpen(#ExpandPath(test.csv')#, read); andrew, is that a typo in the post or in the code as well? you've got

[cfaussie] Re: Quick List question

2008-09-09 Thread Brett Payne-Rhodes
I don't think list processing is clever enough to say Ignore delimiters that are inside double quotes so it treats the comma inside your 'third' element as a valid delimiter. You might have to run a clever bit of regex to replace said commas before the list processing and once you have the

[cfaussie] Re: Quick List question

2008-09-09 Thread Barry Beattie
Andrew, I'm curious is it just the ListGetAt(position) function that's the grief? it might be broken itself I wonder if all list functions are similarly broken: if you convert your list to an array with ListToArray(list) first would you get the correct 4 items or incorrect 6 items? On