Solved

remove last comma

Posted on 2014-12-08
4
93 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
  • 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

759 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now