Hi ive the below piece of code, in which at the minute if PRINTPRICE exists in the csv file and is equal to "Y" is shows the prices otherwise they are hidden
<cfif structheader.PRINTPRICE eq "Y">
The above is working fine, but on older csv files it doesn't have "PRINTPRICE" so if "PRINTPRICE" doesn't exist I want it to display the prices by default
I was using the below piece of code but the prices are still been hidden on me
any one any tips on sorting this?
<cfif isdefined ("structheader.PRINTPRICE")>
<cfif structheader.PRINTPRICE eq "Y" OR "">
I think you have to be more literal in the second part of the or statement.
<cfif structheader.PRINTPRICE eq "Y" OR structheader.PRINTPRICE eq "">
Alternatively, if PRINTPRICE is not defined you could use a negative NOT isDefined.
<cfif not isDefined('structheader.PRINTPRICE')>
<cfelseif structheader.PRINTPRICE EQ "Y">
...do something specific
... do something else