What do you mean by "it fails miserably?". You could try simplifying it with a 
CFSWTCH/CFCASE statement instead...

<cfswitch expression="#len(form.reorder)#">
        <cfcase value="4">
                <cfset Order_Number  = 0000 />
        </cfcase>
        
        <cfcase value="5">
                <cfset Order_Number = 000 />
        </cfcase>
        
        <cfcase value="6">
                <cfset Order_Number = 00 />
        </cfcase>
        
        <cfcase value="7">
                <cfset Order_Number = 0 />
        </cfcase>
</cfswitch>

<cfset Order_Number = Order_Number & form.reorder />

It pretty much does the same as your IF statement but personally I find that a 
bit easier to read!

Because you've got an obvious pattern as well you could do this in loop and 
make CF do all the work for you. Dependings on your personal preference I guess.

James

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:282286
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to