try this... no pun intended : ) <cftry> <cfset thisNum = NumberFormat(tgallons,"99999.99") + 0> #thisNum# <cfcatch type="ANY"> <div style="color:##ff0000;">X</div> </cfcatch> </cftry>
----- Original Message ----- From: "Ihrig Paul E Cont 88 ABW/EM" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, July 28, 2003 7:45 AM Subject: testing for format isNumeric > this is pulling from an old oracle database i don't have access to correct any problems with data type mismatches. > > so looks like there may be alpha characters or other junk in a "gallons" numeric field > that is displayed... > > what i want to do is if i cant do a calculation to a field do to a data type miss match. > > to show say a RED X instead of its normal number. > this way the database admin can physically correct the problem, but the record set will still display the rest of the content.. > > so how would i check for mis match. > > <cfif isNumeric(gallons)> > <cfset tgallons=tgallons+gallons> > <CFELSE> > <cfset tgallons="SetX"> > </cfif> > > <cfif isNumeric(tgallons)><cfoutput>#NumberFormat(tgallons,"99999.99")#</cfoutput> > <cfelse> > <strong><font color="#FF0000">X</font></strong></font> > </cfif> > > you help is much appreciated! > thank you > -paul > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

