Thanks for the help all;
finally settled on:
<cfset testStruct = structnew() />
<cfset testStruct.LinkText_1 = "Linktest1" />
<cfset testStruct.LinkText_2 = "Linktest2" />
<cfset testStruct.LinkText_3 = "Linktest3" />
<cfset testStruct.UrlText_1 = "Urltest1" />
<cfset testStruct.UrlText_2 = "Urltest2" />
<cfset testStruct.UrlText_3 = "Urltest3" />
<cfset TempLinkQ=QueryNew("linkname,url", "varchar,varchar")>
<cfdump var="#testStruct#" />
<cfset counter =1>
<cfloop list="#structKeyList(testStruct)#" index="key">
<cfif key CONTAINS "linktext" AND len(teststruct[key]) GTE 1>
<cfoutput>
<cfset QueryAddRow(TempLinkQ, 1)>
<cfset QuerysetCell(TempLinkQ, "linkname",
"#testStruct["linkText_" & counter]#")>
<cfset QuerysetCell(TempLinkQ, "url", "#testStruct["UrlText_" &
counter]#")>
</cfoutput>
<cfset counter=(counter+1)>
</cfif>
</cfloop>
<cfdump var="#TempLinkQ#">
It's the "#testStruct["UrlText_" & counter]#" syntax which was the key for
me!
Ta
T
2008/10/29 Tom Chiverton <[EMAIL PROTECTED]>
> On Wednesday 29 Oct 2008, Jake Churchill wrote:
> > <cfloop list="#structKeyList(form)#" index="key">
>
> This will loop over each Url and Text, where as you really want one to be
> both
> url and text.
> Use one of the condition based loops instead.
>
> --
> Tom Chiverton
> Helping to quickly repurpose user-centric synergies
>
>
>
> ****************************************************
>
> This email is sent for and on behalf of Halliwells LLP.
>
> Halliwells LLP is a limited liability partnership registered in England and
> Wales under registered number OC307980 whose registered office address is at
> Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A
> list of members is available for inspection at the registered office. Any
> reference to a partner in relation to Halliwells LLP means a member of
> Halliwells LLP. Regulated by The Solicitors Regulation Authority.
>
> CONFIDENTIALITY
>
> This email is intended only for the use of the addressee named above and
> may be confidential or legally privileged. If you are not the addressee you
> must not read it and must not use any information contained in nor copy it
> nor inform any person other than Halliwells LLP or the addressee of its
> existence or contents. If you have received this email in error please
> delete it and notify Halliwells LLP IT Department on 0870 365 2500.
>
> For more information about Halliwells LLP visit www.halliwells.com.
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314549
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4