Solved

remove last comma

Posted on 2014-12-08
4
114 Views
Last Modified: 2014-12-08
Hi,

How can I remove my last comma?

          <cfquery name="New_Portal" datasource="#dsn#" username="#dbID#" password="#dbPassword#">
								Select PortalId as PID, PortalName as PN
								From AppPortal
								Where PortalID IN (#New_Data.Portal#)
							</cfquery>   
                            <CFIF (isDefined("New_Portal") and #New_Portal.RecordCount# gt 0)>
                            <cfoutput query="New_Portal">
                            #New_Portal.PN#,
                            </cfoutput>
                            </CFIF>

The output is this: 

Agent, Group, Internal Facing, Member, Provider, N/A, 

The output that I want is this: 

Agent, Group, Internal Facing, Member, Provider, N/A

Open in new window

0
Comment
Question by:lulu50
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 39

Accepted Solution

by:
gdemaria earned 500 total points
ID: 40486679
Option One...
<cfset allPN = valueList(New_Portal.PN)>
  #allPN#

Option Two..

       <CFIF (isDefined("New_Portal") and #New_Portal.RecordCount# gt 0)>
               <cfoutput query="New_Portal">
                   <cfif new_portal.currentRow gt 1>,</cfif> #New_Portal.PN#
              </cfoutput>
     </CFIF>
0
 

Author Comment

by:lulu50
ID: 40486746
gdemaria,

IIIITTTTT IIIIISSSS WORKING!!!!

GREATTTTTTT!!!!

Thank you :-)
0
 

Author Closing Comment

by:lulu50
ID: 40486747
Thank you
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 40486786
super!  Thanks
0

Featured Post

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PROBLEM:  How to open a cfwindow or run a function on double click of a cfgrid row. One of my clients wanted to be able to double click on a row item to get more detailed information about a transaction and to be able to modify the line items i…
CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question