Advertisement

05.29.2008 at 10:44AM PDT, ID: 23442283
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.3

CFLoop List Problem

Asked by bhlang in ColdFusion Application Server, Cold Fusion Markup Language

I have a field in a query that is a tab-delimited list.
I'm trying to use CFLoop to output the items of this list and I'm seeing some weird results.
Code and sample below.

It looks like the CFLOOP is showing each element multiple times for some reason. Any ideas on how I can fix it?
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
<cfquery name="getEmail" datasource="#Application.DSN#">
	SELECT mDate, mFrom, mSubject, mAttachments
	FROM EmailNews
	ORDER BY mDate DESC 
</cfquery>
<table>
<cfoutput query="getEmail">
	<tr>
		<td>#getEmail.mDate#</td>
		<td>#getEmail.mFrom#</td>
		<td>#getEmail.mSubject#</td>
		<td><cfif Trim(getEmail.mAttachments) neq "">
				<cfset AttachmentList = Replace(getEmail.mAttachments,chr(9),",","All")>
				<cfloop list="#AttachmentList#" index="ListItem">
					<cfoutput>#ListItem#<br></cfoutput>
				</cfloop>
			<cfelse>
				n/a
			</cfif></td>
	<td>#ListLen(getEmail.mAttachments,chr(9))#</td>
	</tr>
</cfoutput>
</table>
<!--- OUTPUT FOLLOWS --->
<table>
	<tr>
		<td>2008-05-28 12:00 AM</td>
		<td>"Brian Lang" <brilang@example.com></td>
		<td>[Everyone] attached</td>
		<td> golf tournament sign up list.xls<br>
			golf tournament sign up list.xls<br>
			golf tournament sign up list.xls<br>
			golf tournament sign up list.xls<br>
			golf tournament sign up list.xls<br>
			golf tournament sign up list.xls<br>
			golf tournament sign up list.xls<br>
			golf tournament sign up list.xls<br></td>
		<td>1</td>
	</tr>
	<tr>
		<td>2008-05-28 12:00 AM</td>
		<td>"Brian Lang" <brilang@example.com></td>
		<td>Testing read and delete</td>
		<td> n/a </td>
		<td>0</td>
	</tr>
	<tr>
		<td>2008-05-28 12:00 AM</td>
		<td>"Brian Lang" <brilang@example.com></td>
		<td>Yet Another Test</td>
		<td> n/a </td>
		<td>0</td>
	</tr>
	<tr>
		<td>2008-05-28 12:00 AM</td>
		<td>"Brian Lang" <brilang@example.com></td>
		<td>Yet Another Test 2</td>
		<td> Matterhorn.jpg<br>
			Matterhorn.jpg<br>
			Matterhorn.jpg<br>
			Matterhorn.jpg<br>
			Matterhorn.jpg<br></td>
		<td>1</td>
	</tr>
	<tr>
		<td>2008-05-27 12:00 AM</td>
		<td>"Brian Lang" <brilang@example.com></td>
		<td>[Everyone] Alarm</td>
		<td> n/a </td>
		<td>0</td>
	</tr>
	<tr>
		<td>2008-05-27 12:00 AM</td>
		<td>"Brian Lang" <brilang@example.com></td>
		<td>Another Test Message</td>
		<td> fw-08-fraser-valley.pdf<br>
			fw-08-fraser-valley.pdf<br>
			fw-08-fraser-valley.pdf<br></td>
		<td>1</td>
	</tr>
	<tr>
		<td>2008-05-27 12:00 AM</td>
		<td>"Brian Lang" <brilang@example.com></td>
		<td>Multi-Attach Test</td>
		<td> Derby-Take-Out-Menu.pdf<br>
			Derby-Take-Out-Menu.pdf<br>
			DerbyMenu.pdf<br>
			DerbyMenu.pdf<br></td>
		<td>2</td>
	</tr>
	<tr>
		<td>2008-05-27 12:00 AM</td>
		<td>"Brian Lang" <brilang@example.com></td>
		<td>Another attachment test</td>
		<td> PGC Prospect Sources.pdf<br>
			Temporary Importation Bond shipment notification.pdf<br>
			Google AdWords Nov 28 2007.pdf<br></td>
		<td>3</td>
	</tr>
</table>
[+][-]05.29.2008 at 03:19PM PDT, ID: 21673824

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.30.2008 at 02:33AM PDT, ID: 21676288

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: ColdFusion Application Server, Cold Fusion Markup Language
Sign Up Now!
Solution Provided By: dgrafx
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.30.2008 at 08:31AM PDT, ID: 21678699

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.30.2008 at 08:32AM PDT, ID: 21678718

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.30.2008 at 09:09AM PDT, ID: 21679091

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.30.2008 at 09:14AM PDT, ID: 21679129

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.30.2008 at 09:20AM PDT, ID: 21679197

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2008 at 09:26AM PDT, ID: 21679244

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.30.2008 at 09:32AM PDT, ID: 21679293

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2008 at 09:40AM PDT, ID: 21679351

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.30.2008 at 11:31AM PDT, ID: 21680256

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.31.2008 at 05:46AM PDT, ID: 21683568

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628