As I said, relying on line numbers doesn't seem like a robust method - what 
happens if the top of the invoice is changed, and it suddenly becomes line 
15/16 or 32/33 or something else?

Ideally you refer specifically to the location of the invoice number, hence 
asking for a sample of the invoice to see what structure it uses.


If you r*eally* want to deal with line numbers, then you can split the content 
into an array and do something like this:

<cfif Len(line[26]) >
        <cfset InvoiceNo = line[26] />
<cfelseif Len(line[27]) >
        <cfset InvoiceNo = line[27] />
<cfelse>
        <cfthrow message="Can't locate invoice number." />
</cfif>

(Or, if this is the only time you're looking at lines, use ListGetAt with 
newlines as delimiters) 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327361
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to