Steve Bernard asked for David Crawford's posting; it's in here.
-David S.
--------- Forwarded message ----------
From: "Canyon WebWorks - Benjamin S. Rogers" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Date: Mon, 20 Sep 1999 12:14:46 -0700
Subject: RE: Blasted loops..
Message-ID: <001401bf039c$66914080$39658acf@transept>
The query variables within your first loop go out of scope when the
second
loop begins. Try something like this:
<cfset i = 1>
<cfloop query="MyOuterQuery">
<cfoutput>#SomeColumn#</cfoutput>
<cfloop query="MyNestedQuery">
<cfoutput>#MyOuterQuery.SomeColumn[i]</cfoutput>
</cfloop>
<cfset i = i + 1>
</cfloop>
The variable SomeColumn should reference the same data whether it is
being
called from within the outer or nested loop.
I used the variable i because I think CurrentRow goes out of scope when
in
the second query. However, you might be able to use
#MyOuterQuery.SomeColumn[MyOuterQuery.CurrentRow]#.
Benjamin S. Rogers
Manager Technical Operations
Canyon WebWorks
http://www.canyon.net
[EMAIL PROTECTED]
520.773.9059
fax 773.4945
-----Original Message-----
From: Don Vawter [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 20, 1999 11:48 AM
To: [EMAIL PROTECTED]
Subject: Re: Blasted loops..
Have you tried scoping the variables:
in your second test alert(#TestA.interval1#);
I have no idea if this will work but hey the test is simple.
----- Original Message -----
From: Gregory Narain <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 20, 1999 2:50 PM
Subject: Blasted loops..
> Anyone know why CF seems to "forget" values when two loops are nested?
> I have a query that I am looping over, which contains a second loop.
>
> Syntax:
> <CFLOOP QUERY="TestA">
> <!--- Test Point A --->
> <CFOUTPUT><SCRIPT>alert('#Interval1#');</SCRIPT></CFOUTPUT>
> <CFLOOP QUERY="TestB">
> <!--- Test Point B --->
> <CFOUTPUT><SCRIPT>alert('#Interval1#');</SCRIPT></CFOUTPUT>
> <CFSET Interval = Interval1 *
> GetIntervals.IntervalUnit[IntervalUnit1]>
> </CFLOOP>
> </CFLOOP>
>
> Where:
> TestA has fields Interval1,Interval2,Interval1Unit,IntervalUnit2
> TestB has fields DateOpened,ProspectID,UserID
>
> Problem:
> Test Point A sees TestA values
> Test Point B does NOT see TestA values
>
> Someone please tell me I don't have to set a temp var for this to
> work...
>
> Thanks,
> Greg
>
>
> ----- Original Message -----
> From: David E. Crawford <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, September 20, 1999 10:30 AM
> Subject: Re: Using CFOBJECT
>
>
> > Here is a snippet of code to open a word document and then save it
> as HTML -
> > this works in Office 97. Some methods require that you create
> pointers
> > to their parent "object" before accessing them with CF.
> >
> >
> > <cfobject type="COM" name="wrd" class="Word.Application"
> action="CREATE"
> > context="LOCAL">
> > <CFSCRIPT>
> > wrd.Visible = false ;
> > mydoc = wrd.Documents ;
> > retvar = mydoc.Open("d:\temp\htmltest.doc") ;
> > mydoc2 = wrd.ActiveDocument ;
> > mydoc2.SaveAs("d:\temp\htmltest.htm",val("10")) ;
> > wrd.Quit() ;
> > </CFSCRIPT>
> >
> > DC
> > -----Original Message-----
> > From: Andy Tyrone <[EMAIL PROTECTED]>
> > To: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]>
> > Date: Monday, September 20, 1999 16:23
> > Subject: Using CFOBJECT
> >
> >
> > >Hello . . .
> > >
> > >I've been messing with cfobject on the side (thank God I don't have
> to
> > >use
> > >it for actual development yet) and am having trouble accessing
> certain
> > >methods of programs, namely the Open method of Microsoft Word.
> There
> > >must
> > >be something simple I am missing. When using oleview all the
> methods of
> > >the
> > >_IDispatch are listing, but there is no Open. I can use SaveAs,
> but
> > >this
> > >just saves a blank document. I am assuming you don't have to
> register
> > >methods, but am not too sure. I have the code I am using below:
> > >
> > ><cfobject type="COM" name="wobj" class="Word.Document.8"
> > >action="CREATE">
> > >
> > ><cfscript>
> > >
> > >wobj.SaveAs("e:\testfile.doc");
> > >wobj.Close();
> > >
> > ></cfscript>
> > >
> > >Of course this has no functionality, rhyme or reason, but I am just
> > >experimenting. The above code just saves a blank file. Trying to
> > >access
> > >the Open method, like wobj.Open("e:\testfile.doc") results in a
> "can't
> > >find
> > >the object's method" or some such... I cannot find ANY decent
> tutorials
> > >on
> > >using cfobject with specific programs. If anyone can help, it
> would be
> > >greatly appreciated. This is one of those things that I have been
> > >trying to
> > >figure out (on the side) for a week now.
> > >
> > >Thanks =)
> > >
> > >Andy Tyrone
> > >Micro Business Systems
> >
> >---------------------------------------------------------------------
> ---
> > >------
> > >Archives: http://www.eGroups.com/list/cf-talk
> > >To Unsubscribe visit
> >
> >http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_ta
> lk
> > >or send a message to [EMAIL PROTECTED] with
> > >'unsubscribe' in the body.
> > >
> >
> > --------------------------------------------------------------------
> ----------
> > Archives: http://www.eGroups.com/list/cf-talk
> > To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_tal
> k or send a message to [EMAIL PROTECTED] with
> 'unsubscribe' in the body.
>
>
-------------------------------------------------------------------------
-
----
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
-------------------------------------------------------------------------
---
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
-------------------------------------------------------------------------
-----
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe'
in the body.
________________________________________________________________
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk! For your FREE software, visit:
http://dl.www.juno.com/get/tagj.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.