Question
ColdFusion Structure
I'm looping an array of records (from a fixed length feed)
and creating a structure for each required field. Then for every
loop, I'm passing this structure to a function to check if certain
required field in the structure's element is left empty.
The structure should look something like this:
<cfloop from="1" to="#ArrayLen(MyFile)#" index="i">
<cfset aEachLine =StructNew()>
<cfset aEachLine["LastName"]="#Mid(MyFile ,17,40)#">
<cfset aEachLine["FirstName"]="#Mid(MyFile ,57,20)#">
<cfset aEachLine["Address"]="#Mid(MyFile ,140,38)#">
<cfset aEachLine["City"]="#Mid(MyFile ,254,19)#">
<cfset aEachLine["State"]="#Mid(MyFile ,273,2)#">
<cfset aEachLine["Country"]="#Mid(MyFile ,284,4)#">
In this example I'm assuming that my structure is this short
<CFSET CheckStructValue=CheckThisStruc(aEachLine)>
</cfloop>
How do I check if any of those struct. value is empty?
The structure should look something like this:
<cfloop from="1" to="#ArrayLen(MyFile)#" index="i">
<cfset aEachLine =StructNew()>
<cfset aEachLine["LastName"]="#Mid(MyFile ,17,40)#">
<cfset aEachLine["FirstName"]="#Mid(MyFile ,57,20)#">
<cfset aEachLine["Address"]="#Mid(MyFile ,140,38)#">
<cfset aEachLine["City"]="#Mid(MyFile ,254,19)#">
<cfset aEachLine["State"]="#Mid(MyFile ,273,2)#">
<cfset aEachLine["Country"]="#Mid(MyFile ,284,4)#">
In this example I'm assuming that my structure is this short
<CFSET CheckStructValue=CheckThisStruc(aEachLine)>
</cfloop>
How do I check if any of those struct. value is empty?
