Most likely I missed something, because doesn't structFindKey return a value
as well as the path to the key?
Unless you're talking about getting the "path" to another key, not the one
you just found.?

XPath only works with XML documents, neh? Hmm... must need more coffee...
missing something obvious, feels I...
:d

On 4/14/06, Bruce, Rodney S C-E LCMC HQISEC/Signal Solutions <
[EMAIL PROTECTED]> wrote:
>
> Isaac,
>
> Thanks for the <script>, will have to play around with it.
>
> I also found Structget(), but it doesn't like anything other than alpha
> and
> numeric in the Keys.
> Even using ['item 1'], Structget() throws an error or ['item-1'], has to
> be
> ['item1'].
>
> Using  rereplace(key, '[^[:alpha:]]', "","all")  when I create the
> structure, I can get Structget() to work.
>
> It is a pain, because then everytime the structure is searched,the
> rereplace
> needs to be done on the key.
>
> But this is still faster than looping thru the structure to find a key(at
> least on large Structures).
>
>         FoundPath = StructKeyFind(MyStruct, rereplace(key, '[^[:alpha:]]',
> "","all") )
>         NewPath = 'MyStruct' & FoundPath[x].path
>         FoundKey = StructGet(Newpath)
>
>         #FoundKey.lastitem#
>
>         can even:
>           FoundKey[newitem] = StructNew()
>           FoundKey[newitem].hours = hoursWorked
>
> In my case here newitem would be a persons id.
>
> Rodney
>
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237808
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to