The CFSET statement,
<cfset txtoutput = '"#BillNo#"~"#NewQty#"'>
looks "funny".  What's with the tilde between the quoted strings?  Did you
mean:
<cfset txtoutput = "#BillNo#~#NewCity#">
??

Try "printing" the txtoutput values without the CFFILE and see what you are
getting here.



> -----Original Message-----
> From: Adrian Cesana [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, September 28, 2000 10:48 AM
> To:   CF-Talk
> Subject:      cfloop headache
> 
> What am I doing wrong here...I am trying to evaluate a field and change
> the
> outoput based on this.  I know I have a few records that meet the <cfif
> get.posted IS "GW"> test but they dont get SET to 0 as if the test failed.
> It appears I am not evaluating on the correct record.  Do I need to set a
> field from the query to a list then loop thru the list perhaps?  Seems
> like
> I should be able to do it like this somehow...
> 
> Thanks,Adrian
> 
> 
> Ive slimmed the query and output down to make it simple:
> 
> 
> <CFQUERY NAME="get" DATASOURCE="blah">
> SELECT billno,posted,qty FROM blah WHERE blah
> </CFQUERY>
> 
> <cfloop query="get">
> 
> <cfif posted IS "GW">   <!--- tried get.posted - same result --->
> <cfset NewQty = 0>
> <cfelse>
> <cfset NewQty = qty>
> </cfif>
> 
> <cfset txtoutput = '"#BillNo#"~"#NewQty#"'>
> <cffile action=append file="blah" output="#txtoutput#">
> 
> </cfloop>
> 
> 
> 
> 
> 
> --------------------------------------------------------------------------
> ----
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to