lonnyo
asked on
Multiple OR Conditions in CFIF
I have this loop that loops through a series of attributes. For some reason they have setup an attribute for each month that has a value of true or false. I want to skip over these so they are not added to the query I am creating (using QueryNew - data comes from a soap call).
The code that I have is not working plus I am sure there is a better way.
Here is the code I have to prevent the code from creating a row:
The code that I have is not working plus I am sure there is a better way.
Here is the code I have to prevent the code from creating a row:
<cfif includeAttribute>
<cfif AttributeNode["DisplayName"].xmlText NEQ "January" OR
AttributeNode["DisplayName"].xmlText NEQ "February" OR
AttributeNode["DisplayName"].xmlText NEQ "March" OR
AttributeNode["DisplayName"].xmlText NEQ "April" OR
AttributeNode["DisplayName"].xmlText NEQ "May" OR
AttributeNode["DisplayName"].xmlText NEQ "June" OR
AttributeNode["DisplayName"].xmlText NEQ "July" OR
AttributeNode["DisplayName"].xmlText NEQ "August" OR
AttributeNode["DisplayName"].xmlText NEQ "September" OR
AttributeNode["DisplayName"].xmlText NEQ "October" OR
AttributeNode["DisplayName"].xmlText NEQ "November" OR
AttributeNode["DisplayName"].xmlText NEQ "December">
<cfset row = queryAddRow(getAttributes, 1)>
<cfset getAttributes.VenueID[row] = CurrentVenueID>
<cfset getAttributes.DisplayName[row] = AttributeNode["DisplayName"].xmlText>
<cfset getAttributes.Type[row] = AttributeNode["Type"].xmlText>
<cfset getAttributes.Value[row] = AttributeNode["Value"].xmlText>
</cfif>
</cfif>
ASKER
I need to take a closer look at this. May not be until later tonight or tomorrow.
Thank you.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That worked with the correction above. Thank you very much.
Watch out for line wrapping
Open in new window
As an aside didn't the original code have some of the values (like AttributeNode["DisplayName