Delimeter problem

2004-11-09 Thread Asim Manzur
|153564587|0|SAT|FREEDMAN|||1|||10/17/2004|10/18/2004 

I need to move all the valus in a into individual Structure/Array Keys. so I 
can display them individually.


The above result I have it in a Varilable.
If I use the listGetAt() I can't move value becuase two || are todather(no 
space between them).

What is the best way to acheive this??

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183739
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


RE: Delimeter problem

2004-11-09 Thread Tim Blair
Asim,

 I need to move all the valus in a into individual 
 Structure/Array Keys. so I can display them individually.

If you're using MX, check this thread:
http://www.mail-archive.com/dev@lists.cfdeveloper.co.uk/msg16596.html

Tim.

--
---
Badpen Tech - CF and web-tech: http://tech.badpen.com/
---
RAWNET LTD - independent digital media agency
We are big, we are funny and we are clever!
 New site launched at http://www.rawnet.com/
---
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
--- 

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183741
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


RE: Delimeter problem

2004-11-09 Thread djones
I would use

cfset variableArray =
#listToArray(|153564587|0|SAT|FREEDMAN|||1|||10/17/2004|10/18/2004,
|)#
then use
#variableArray[1]#
#variableArray[2]#
#variableArray[3]#
#variableArray[4]#
and so on...

Thanks,

David


-Original Message-
From: Asim Manzur [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 09, 2004 10:21 AM
To: CF-Talk
Subject: Delimeter problem


|153564587|0|SAT|FREEDMAN|||1|||10/17/2004|10/18/2004

I need to move all the valus in a into individual Structure/Array Keys. so I
can display them individually.


The above result I have it in a Varilable.
If I use the listGetAt() I can't move value becuase two || are todather(no
space between them).

What is the best way to acheive this??



~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183742
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


Re: Delimeter problem

2004-11-09 Thread Qasim Rasheed
I tried this and it worked. 

cfset list = |153564587|0|SAT|FREEDMAN|||1|||10/17/2004|10/18/2004
cfdump var=#listtoarray( replace( list, '||', '| |', 'All' ), '|' )#




On Tue, 09 Nov 2004 11:20:41 -0400, Asim Manzur [EMAIL PROTECTED] wrote:
 |153564587|0|SAT|FREEDMAN|||1|||10/17/2004|10/18/2004
 
 I need to move all the valus in a into individual Structure/Array Keys. so I 
 can display them individually.
 
 The above result I have it in a Varilable.
 If I use the listGetAt() I can't move value becuase two || are todather(no 
 space between them).
 
 What is the best way to acheive this??
 
 

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183744
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


RE: Delimeter problem

2004-11-09 Thread Tim Blair
David,

 cfset variableArray =
 #listToArray(|153564587|0|SAT|FREEDMAN|||1|||10/17/2004|1
 0/18/2004,
 |)#
 then use
 #variableArray[1]#
 #variableArray[2]#
 #variableArray[3]#
 #variableArray[4]#
 and so on...

This is exactly what Asim tried to do without success -- the CF list
functions ignore empty list elements, but my understanding is that he
needs to retain those empty elements, hence my previous pointer to an
identical thread.

Tim.


--
---
Badpen Tech - CF and web-tech: http://tech.badpen.com/
---
RAWNET LTD - independent digital media agency
We are big, we are funny and we are clever!
 New site launched at http://www.rawnet.com/
---
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
--- 

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183745
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


RE: Delimeter problem

2004-11-09 Thread Tim Blair
Qasim,

 listtoarray(replace(list, '||', '| |', 'All'), '|')

This wouldn't work because there is actually an empty element *before*
the 153564587 item -- your code only replaces empty elements in the
middle of the series and would ignore those at the beginning or end.  Of
course you could simply add a space at both the beginning and end of the
string before it is parsed, which would get around the problem.

You still have the slight inconvenience of empty elements actually
containing a single space; what happens if one of the elements did
actually contain a single space?  You'd have no way of knowing the
difference between the real element and those that have been padded.

Tim.


--
---
Badpen Tech - CF and web-tech: http://tech.badpen.com/
---
RAWNET LTD - independent digital media agency
We are big, we are funny and we are clever!
 New site launched at http://www.rawnet.com/
---
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
--- 

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183747
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


RE: Delimeter problem

2004-11-09 Thread Pascal Peters
http://www.cflib.org/udf.cfm?ID=507

Pascal

 -Original Message-
 From: Asim Manzur [mailto:[EMAIL PROTECTED]
 Sent: 09 November 2004 16:21
 To: CF-Talk
 Subject: Delimeter problem
 
 |153564587|0|SAT|FREEDMAN|||1|||10/17/2004|10/18/2004
 
 I need to move all the valus in a into individual Structure/Array
Keys. so
 I can display them individually.
 
 
 The above result I have it in a Varilable.
 If I use the listGetAt() I can't move value becuase two || are
todather(no
 space between them).
 
 What is the best way to acheive this??
 
 

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183756
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


Re: Delimeter problem

2004-11-09 Thread Asim Manzur
Thanks Tim and everyone.
That post really helpful and cflib UDF looks like a solution.


-A

Qasim,

 listtoarray(replace(list, '||', '| |', 'All'), '|')

This wouldn't work because there is actually an empty element *before*
the 153564587 item -- your code only replaces empty elements in the
middle of the series and would ignore those at the beginning or end.  Of
course you could simply add a space at both the beginning and end of the
string before it is parsed, which would get around the problem.

You still have the slight inconvenience of empty elements actually
containing a single space; what happens if one of the elements did
actually contain a single space?  You'd have no way of knowing the
difference between the real element and those that have been padded.

Tim.


--
---
Badpen Tech - CF and web-tech: http://tech.badpen.com/
---
RAWNET LTD - independent digital media agency
We are big, we are funny and we are clever!
 New site launched at http://www.rawnet.com/
---
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
---

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183761
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