[thelist] CFTRY/CFCATCH

Raymond Camden jedimaster at macromedia.com
Tue Mar 26 12:17:00 CST 2002


I'm not sure why you need error handling here. I may be missing
something. Why not simply do:

<cfif val is "">
	<cfset val = 0>
</cfif>

-raymond

> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org] On Behalf Of Starkey
> Connie - cstark
> Sent: Tuesday, March 26, 2002 1:05 PM
> To: 'thelist at lists.evolt.org'
> Subject: [thelist] CFTRY/CFCATCH
>
>
> In the following code, I want to look at the volume discount
> percent and amount fields and if they are blank, to default
> them to 0's. I was considering using CFTRY/CFCATCH.  Can
> someone tell me if there is a better solution?
>
>
> <cfloop index="x" from="1" to="#length#">
> 	<cfset ItemCodes = ListGetAt(#qBillingView.ItemCodes#,x)>
> 	<cfset ItemPrices = ListgetAt(#qBillingView.ItemPrices#,x)>
> 	<cfset Percent =
> ListgetAt(#qBillingView.volumediscountpercent#,x)>
> 	<cfset Amount =
> ListgetAt(#qBillingView.volumediscountamount#,x)>
> 	<cfset ItemCodeDescription =
> ListgetAt(#qBillingView.ItemCodeDescription#,x)>





More information about the thelist mailing list