Mark, Thanks.
>>What do you mean when you say "array"?  I am reading the docs for
StructKeyFind to mean that if a Struct contains another struct then it will
dive into that too, but it doesn't say it will scan Arrays.

What you say makes sense but are we reading the same CFDocs? Originally I thought StructFindKey was just for structures too. Then I looked at the MX CFDocs and they specifically say "Structure or Array" in several places and that they can be nested. Maybe that means one or the other but not mixed?

Here's another quote: "Searches recursively through a substructure of nested arrays, structures, and other elements"

I am not so much interested in getting a solution to a specific coding issue. I don't think I am understanding the CFDocs clearly. I wondered if anyone else has been through this and come up with a concise summary of StructFindKey behavior.

>>At any rate, if you describe your data structure more clearly then you'll be
more likely to get an accurate answer.

The data structure is similar to the example I provided, except that the stuct keys are well formed and the data is not such a regular pattern. (I was tired when I knocked that up...don't know what I was thinking!)

It groups together a structure of summary details (aArray[n][1]) with varying numbers of line items (aArray[n][2,3,4,...n]) each of which holds a structure.

Here's an abbreviated representation:
a2DArray[1][1].iQuoteID
                 [1].sDescription
                 [1].iDiscountRate
                 [1].iAction

a2DArray[1][2].iQuoteRowID
                 [2].sItemDescription
                 [2].iQuantity
                 [2].iChargePropertyID
                 [2].iAction

a2DArray[1][3].iQuoteRowID
                 [3].sItemDescription
                 [3].iQuantity
                 [3].iChargePropertyID
                 [3].iAction

a2DArray[2][1].iQuoteID
                 [1].sDescription
                 [1].iDiscountRate
                 [1].iAction
   

a2DArray[2][2].iQuoteRowID
                 [2].sItemDescription
                 [2].iQuantity
                 [2].iChargePropertyID
                 [2].iAction

Rgds
Sue
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to