RE: Need assistance:Nested CFLOOPs

2001-03-21 Thread Angel Stewart

Yes..I thought so..

but you know when I was doing it the first time...when it was outside the
Query loop, counter was reading as "Limited"..
and when it was inside the Query Loop counter was reading as "1.0"...no
kidding.

I never changed the code..beside enclosing it in that query CFLOOP.

That's why I ended up having two forms in that one loop..one where I used
that wordgetat, and another I probably deleted where I didn't.

I eventually said to heck with the "automatic" loop and used a hard coded 1
to 6 CFLOOP...and that along with rearranging the order of the string to
search for in the Find statement, seems to have done the trick.

Now for my next magic show I'll be cycling through the defendant field
string, locating the first name, then the last name..and placing them in the
form Lastname,Firstname...and if I find any other names after this initial
last name and first name I'm to put them in a seperate table using the same
Sequence number to make a One To Many relationship

and

and I guess you folks will be hearing from me again sometime tomorrow ^_^

-Gel


-Original Message-
From: Bob Silverberg [mailto:[EMAIL PROTECTED]]

Try:





The Defendant IS:#judgement.defendant#

The Current List Item Is:#counter#


Hey! We Found A Company




Your problem is the line where you're creating WordToGet - you don't need
that,
Bob



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Solved the problem( Need assistance:Nested CFLOOPs)

2001-03-21 Thread Bob Silverberg

The reason it's working is that you changed your inner loop from a LIST loop
to a simple counter loop.  The problem you had, as mentioned in a previous
email which has yet to reach the list, was with the combination of the LIST
loop and the WordToGet variable, which was always extracting the same
element from the list.

Go back to a list loop and get rid of WordToGet (see my earlier posting) and
it will both work and be more elegant.  One of the problems with the
solution below is that you've hardcoded the number of elements in the list
(6), so you can't just add an item to the list, or switch the list to a
passed-in parameter.

Hope the above explains the problem with the original code,
Bob

-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 4:15 PM
To: CF-Talk
Subject: RE:Solved the problem( Need assistance:Nested CFLOOPs)






Current Defendant is :#judgement.defendant#








  Hey! We Found A
Company 







That's code is working just fine.

Now if someone can tell me WHY its working ..I'd like to know. Because I
just opened a new document and recoded it from scratch, and ..voila..it
works now.

I am using the same CFLOOP structure I was using before...except for this
tempdefendant thing, which does not have an effect on the inner loop.

*sigh*
I must be tired or something?

-Gel
Original Code:



 The Defendant IS:#judgement.defendant#


 The Current List Item Is:#WordToGet#



  Hey! We Found A Company 




~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Need assistance:Nested CFLOOPs

2001-03-21 Thread Todd Ashworth

When you loop through a list of words, your "counter" isn't a number .. it's
the current word you are on in the list.  Therefore, the first time through,
"counter" is "Limited" .. the second time through, it is LTD.  When you use
"counter" as a number in ListGetAt(#CompanyList#,#counter#,",")>, I imagine
CF is getting confused and just picking the first thing it finds in the
list.

Try just ting your "counter" there instead of using ListGetAt() ..
or find the position of your "counter" in your list with ListFind() or
ListFindNoCase() and use that in your ListGetAt()

Todd Ashworth --
Web Application Developer
Network Administrator

Saber Corporation
314 Oakland Ave.
Rock Hill, SC 29730
(803) 327-0137 [111]
- Original Message -
From: "Angél Stewart" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 2:42 PM
Subject: RE: Need assistance:Nested CFLOOPs


| umm..judgement.defendant is changing..thats not the problem.
|
| The problem is that it is not going over the list of words to search for.
| The list called Company List.
|
| So hence you see Limited,Limited,Limited Limited 7 times in the output.
|
| When what you should see is
|
| The Defendant IS:MOHD, SARI
| The Current List Item Is:Limited
| The Defendant IS:MOHD, SARI
| The Current List Item Is:Ltd
| The Defendant IS:MOHD, SARI
| The Current List Item Is:Ltd.
| The Defendant IS:MOHD, SARI
| The Current List Item Is:CO
| The Defendant IS:MOHD, SARI
| The Current List Item Is:CO.
| The Defendant IS:MOHD, SARI
| The Current List Item Is:THE
|
| etc. etc.
| But it is just picking up that first list item, Limited..and although it
is
| going over the thing 7 times..its not reading the other items in the list.
|
| I know there is some simple syntax error somewhere..I just can't find it.
|
| -Gel
|
|
|
| -Original Message-
| From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, 21 March 2001 12:59
| To: CF-Talk
| Subject: RE: Need assistance:Nested CFLOOPs
|
|
| I just skimmed through it, and it seemed that your query output is not
| right.
|
| When u do a judgement.defendant inside that query loop, it will always
| remain the same.  it will always output the first row from that query.
| instead, just use defendant.  since you're already inside that query loop,
| it will refer to the query name.  there is no need to specify it
|
|
|
|
| -Original Message-----
| From: Angél Stewart [mailto:[EMAIL PROTECTED]]
| Sent: Wednesday, March 21, 2001 9:39 AM
| To: CF-Talk
| Subject: Need assistance:Nested CFLOOPs
|
|
| Hi all.
|
| I am having a problem with a nested CFLOOP refusing to loop!
|
| The Code:
| 
| 
| 
|  The Defendant
| IS:#judgement.defendant#
| 
| 
|  The Current List Item
| Is:#WordToGet#
| 
| 
|
|   Hey! We Found A Company
| 
|
| 
| 
| 
|
| I want to search the defendant field to determine if any of those strings
| are contained within it.
| It cycled fine, until I enclosed it in the CFLOOP query="judgement"...
|
| I expected it to go to the first record in teh Judgement table..
|
| Then loop through the strings to search for, perform the search...and then
| drop out and CFQUERY LOOP back to the top..wher eit would go to the next
| record...and do the same thing.
|
| What's the problem with my code?
|
| This is my output:
|
| The Defendant IS:MOHD, SARI
| The Current List Item Is:Limited
| The Defendant IS:MOHD, SARI
| The Current List Item Is:Limited
| The Defendant IS:MOHD, SARI
| The Current List Item Is:Limited
| The Defendant IS:MOHD, ANSARI
| The Current List Item Is:Limited
| The Defendant IS:MOHD, SARI
| The Current List Item Is:Limited
| The Defendant IS:MOHD, SARI
| The Current List Item Is:Limited
| The Defendant IS:MOHD, SARI
| The Current List Item Is:Limited
| The Defendant IS:MOHD, SARI
|
| So it is clearly not cycling through the list of strings to search for.
|
| -Gel
|
|
|
|
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Need assistance:Nested CFLOOPs

2001-03-21 Thread Hayes, David

OK, here's something I missed the first time.

You use "counter" as your index in the cfloop, but this isn't an index loop;
since it's a list loop, counter evaluates to an item in the list.

Look at line 6 - you're using listGetAt with counter as the position
attribute; counter may be evaluating as "true" or 1 in this context
(although I'm surprised it's not throwing an error).  (You don't need the #
signs in the function call.)

You're using counter properly in line 9, although you don't need the # signs
here.

Naming the index "company" instead of "counter" might have helped; my guess
is you changed loop strategies at some point.


1
2   
3   
4The Defendant
IS:#judgement.defendant#
5   
6   
7The Current List Item
Is:#WordToGet#
8   
9   
10Hey! We Found A Company

11  
12  
13

-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 1:42 PM
To: CF-Talk
Subject: RE: Need assistance:Nested CFLOOPs


umm..judgement.defendant is changing..thats not the problem.

The problem is that it is not going over the list of words to search for.
The list called Company List.

So hence you see Limited,Limited,Limited Limited 7 times in the output.

When what you should see is

The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Ltd
The Defendant IS:MOHD, SARI
The Current List Item Is:Ltd.
The Defendant IS:MOHD, SARI
The Current List Item Is:CO
The Defendant IS:MOHD, SARI
The Current List Item Is:CO.
The Defendant IS:MOHD, SARI
The Current List Item Is:THE

etc. etc.
But it is just picking up that first list item, Limited..and although it is
going over the thing 7 times..its not reading the other items in the list.

I know there is some simple syntax error somewhere..I just can't find it.

-Gel



-Original Message-
From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 21 March 2001 12:59
To: CF-Talk
Subject: RE: Need assistance:Nested CFLOOPs


I just skimmed through it, and it seemed that your query output is not
right.

When u do a judgement.defendant inside that query loop, it will always
remain the same.  it will always output the first row from that query.
instead, just use defendant.  since you're already inside that query loop,
it will refer to the query name.  there is no need to specify it




-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 9:39 AM
To: CF-Talk
Subject: Need assistance:Nested CFLOOPs


Hi all.

I am having a problem with a nested CFLOOP refusing to loop!

The Code:



 The Defendant
IS:#judgement.defendant#


 The Current List Item
Is:#WordToGet#



  Hey! We Found A Company






I want to search the defendant field to determine if any of those strings
are contained within it.
It cycled fine, until I enclosed it in the CFLOOP query="judgement"...

I expected it to go to the first record in teh Judgement table..

Then loop through the strings to search for, perform the search...and then
drop out and CFQUERY LOOP back to the top..wher eit would go to the next
record...and do the same thing.

What's the problem with my code?

This is my output:

The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, ANSARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI

So it is clearly not cycling through the list of strings to search for.

-Gel
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Need assistance:Nested CFLOOPs

2001-03-21 Thread Bob Silverberg

Try:





The Defendant IS:#judgement.defendant#

The Current List Item Is:#counter#


Hey! We Found A Company




Your problem is the line where you're creating WordToGet - you don't need
that,
Bob


-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: March 21, 2001 2:42 PM
To: CF-Talk
Subject: RE: Need assistance:Nested CFLOOPs


umm..judgement.defendant is changing..thats not the problem.

The problem is that it is not going over the list of words to search for.
The list called Company List.

So hence you see Limited,Limited,Limited Limited 7 times in the output.

When what you should see is

The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Ltd
The Defendant IS:MOHD, SARI
The Current List Item Is:Ltd.
The Defendant IS:MOHD, SARI
The Current List Item Is:CO
The Defendant IS:MOHD, SARI
The Current List Item Is:CO.
The Defendant IS:MOHD, SARI
The Current List Item Is:THE

etc. etc.
But it is just picking up that first list item, Limited..and although it is
going over the thing 7 times..its not reading the other items in the list.

I know there is some simple syntax error somewhere..I just can't find it.

-Gel



-Original Message-
From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 21 March 2001 12:59
To: CF-Talk
Subject: RE: Need assistance:Nested CFLOOPs


I just skimmed through it, and it seemed that your query output is not
right.

When u do a judgement.defendant inside that query loop, it will always
remain the same.  it will always output the first row from that query.
instead, just use defendant.  since you're already inside that query loop,
it will refer to the query name.  there is no need to specify it




-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 9:39 AM
To: CF-Talk
Subject: Need assistance:Nested CFLOOPs


Hi all.

I am having a problem with a nested CFLOOP refusing to loop!

The Code:



 The Defendant
IS:#judgement.defendant#


 The Current List Item
Is:#WordToGet#



  Hey! We Found A Company






I want to search the defendant field to determine if any of those strings
are contained within it.
It cycled fine, until I enclosed it in the CFLOOP query="judgement"...

I expected it to go to the first record in teh Judgement table..

Then loop through the strings to search for, perform the search...and then
drop out and CFQUERY LOOP back to the top..wher eit would go to the next
record...and do the same thing.

What's the problem with my code?

This is my output:

The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, ANSARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI

So it is clearly not cycling through the list of strings to search for.

-Gel
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Need assistance:Nested CFLOOPs

2001-03-21 Thread Phoeun Pha

oh u snifflebutt.  eh heh

u used the listloop wrong!  when u use a listloop, u wont need a listgetat
function.  it automatically does it for ya!  so it should be like this.  i
also modified the code to make it work with the new code. :P






 The Defendant
IS:#judgement.defendant#

 The Current List Item
Is:#THETHINGYLISTHEHE#



  Hey! We Found A Company














-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 1:42 PM
To: CF-Talk
Subject: RE: Need assistance:Nested CFLOOPs


umm..judgement.defendant is changing..thats not the problem.

The problem is that it is not going over the list of words to search for.
The list called Company List.

So hence you see Limited,Limited,Limited Limited 7 times in the output.

When what you should see is

The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Ltd
The Defendant IS:MOHD, SARI
The Current List Item Is:Ltd.
The Defendant IS:MOHD, SARI
The Current List Item Is:CO
The Defendant IS:MOHD, SARI
The Current List Item Is:CO.
The Defendant IS:MOHD, SARI
The Current List Item Is:THE

etc. etc.
But it is just picking up that first list item, Limited..and although it is
going over the thing 7 times..its not reading the other items in the list.

I know there is some simple syntax error somewhere..I just can't find it.

-Gel



-Original Message-
From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 21 March 2001 12:59
To: CF-Talk
Subject: RE: Need assistance:Nested CFLOOPs


I just skimmed through it, and it seemed that your query output is not
right.

When u do a judgement.defendant inside that query loop, it will always
remain the same.  it will always output the first row from that query.
instead, just use defendant.  since you're already inside that query loop,
it will refer to the query name.  there is no need to specify it




-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 9:39 AM
To: CF-Talk
Subject: Need assistance:Nested CFLOOPs


Hi all.

I am having a problem with a nested CFLOOP refusing to loop!

The Code:



 The Defendant
IS:#judgement.defendant#


 The Current List Item
Is:#WordToGet#



  Hey! We Found A Company






I want to search the defendant field to determine if any of those strings
are contained within it.
It cycled fine, until I enclosed it in the CFLOOP query="judgement"...

I expected it to go to the first record in teh Judgement table..

Then loop through the strings to search for, perform the search...and then
drop out and CFQUERY LOOP back to the top..wher eit would go to the next
record...and do the same thing.

What's the problem with my code?

This is my output:

The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, ANSARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI

So it is clearly not cycling through the list of strings to search for.

-Gel
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Need assistance:Nested CFLOOPs

2001-03-21 Thread Howarth, Craig (IBK-NY)

This line is the problem:



counter contains the value of the current item in the list, not a numeric 
position.  So listGetAt() won't work as expected as it requires a numeric value in the 
second position.  The variable counter already contains the word you are looking for 
-- no need to look it up.

Craig



> -Original Message-
> From: Ang> él Stewart [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, March 21, 2001 2:42 PM
> To:   CF-Talk
> Subject:  RE: Need assistance:Nested CFLOOPs
> 
> umm..judgement.defendant is changing..thats not the problem.
> 
> The problem is that it is not going over the list of words to search for.
> The list called Company List.
> 
> So hence you see Limited,Limited,Limited Limited 7 times in the output.
> 
> When what you should see is
> 
> The Defendant IS:MOHD, SARI
> The Current List Item Is:Limited
> The Defendant IS:MOHD, SARI
> The Current List Item Is:Ltd
> The Defendant IS:MOHD, SARI
> The Current List Item Is:Ltd.
> The Defendant IS:MOHD, SARI
> The Current List Item Is:CO
> The Defendant IS:MOHD, SARI
> The Current List Item Is:CO.
> The Defendant IS:MOHD, SARI
> The Current List Item Is:THE
> 
> etc. etc.
> But it is just picking up that first list item, Limited..and although it is
> going over the thing 7 times..its not reading the other items in the list.
> 
> I know there is some simple syntax error somewhere..I just can't find it.
> 
> -Gel
> 
> 
> 
> -Original Message-
> From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 21 March 2001 12:59
> To: CF-Talk
> Subject: RE: Need assistance:Nested CFLOOPs
> 
> 
> I just skimmed through it, and it seemed that your query output is not
> right.
> 
> When u do a judgement.defendant inside that query loop, it will always
> remain the same.  it will always output the first row from that query.
> instead, just use defendant.  since you're already inside that query loop,
> it will refer to the query name.  there is no need to specify it
> 
> 
> 
> 
> -Original Message-
> From: Angél Stewart [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 21, 2001 9:39 AM
> To: CF-Talk
> Subject: Need assistance:Nested CFLOOPs
> 
> 
> Hi all.
> 
> I am having a problem with a nested CFLOOP refusing to loop!
> 
> The Code:
> 
>   
>   
>The Defendant
> IS:#judgement.defendant#
>   
>WordToGet=ListGetAt(#CompanyList#,#counter#,",")>
>The Current List Item
> Is:#WordToGet#
>   
>   
> 
> Hey! We Found A Company
> 
> 
>   
>   
> 
> 
> I want to search the defendant field to determine if any of those strings
> are contained within it.
> It cycled fine, until I enclosed it in the CFLOOP query="judgement"...
> 
> I expected it to go to the first record in teh Judgement table..
> 
> Then loop through the strings to search for, perform the search...and then
> drop out and CFQUERY LOOP back to the top..wher eit would go to the next
> record...and do the same thing.
> 
> What's the problem with my code?
> 
> This is my output:
> 
> The Defendant IS:MOHD, SARI
> The Current List Item Is:Limited
> The Defendant IS:MOHD, SARI
> The Current List Item Is:Limited
> The Defendant IS:MOHD, SARI
> The Current List Item Is:Limited
> The Defendant IS:MOHD, ANSARI
> The Current List Item Is:Limited
> The Defendant IS:MOHD, SARI
> The Current List Item Is:Limited
> The Defendant IS:MOHD, SARI
> The Current List Item Is:Limited
> The Defendant IS:MOHD, SARI
> The Current List Item Is:Limited
> The Defendant IS:MOHD, SARI
> 
> So it is clearly not cycling through the list of strings to search for.> 
> 
> -Gel
> 
> 
> 
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE:Solved the problem( Need assistance:Nested CFLOOPs)

2001-03-21 Thread Angél Stewart





Current Defendant is :#judgement.defendant#








  Hey! We Found A
Company 







That's code is working just fine.

Now if someone can tell me WHY its working ..I'd like to know. Because I
just opened a new document and recoded it from scratch, and ..voila..it
works now.

I am using the same CFLOOP structure I was using before...except for this
tempdefendant thing, which does not have an effect on the inner loop.

*sigh*
I must be tired or something?

-Gel
Original Code:



 The Defendant IS:#judgement.defendant#


 The Current List Item Is:#WordToGet#



  Hey! We Found A Company 






~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE:A shortcoming in CF( Need assistance:Nested CFLOOPs PART 2)

2001-03-21 Thread Angél Stewart

I just got this reply from the Allaire message forum. It seems I'm not the
only one that has encountered these inconsistences with CF and the way it
handles loops.

Has this been addressed with any service pack or anything like that?

Oh..and the solution offered did not help.

I suppose I shouldn't waste my time trying to implment this with a CF
solution and look to do it in something else.
*mutter* *grumble*

-GEL

Forum:   Advanced Techniques
Thread:  Nested CFLOOP index inside a CFLOOP query
Author:  Ryan Nelson
Subject: I have had this problem as well

URL: http://forums.allaire.com/devconf/Index.cfm?Message_ID=683702


I have ran into this problem as well and got quite frustrated, but the
answer is pretty easy.  For some reason Cold Fusion doesn't work like any
other language when doing nested loops.  You must make an allowance for
this.  I included your code with a modification.

What I found that I had to do was make a temp variable inside the first loop
but before the nested loop.  This made it work correctly for me.

I hope this helps.


* Accompanied HTML Code *



 

 

 

   The Defendant IS:#tempDefendant#

  

  

   The Current List Item Is:#WordToGet#

  

  

 Hey! We Found A Company 

  

 




-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 9:39 AM
To: CF-Talk
Subject: Need assistance:Nested CFLOOPs


Hi all.

I am having a problem with a nested CFLOOP refusing to loop!

The Code:



 The Defendant
IS:#judgement.defendant#


 The Current List Item
Is:#WordToGet#



  Hey! We Found A Company






I want to search the defendant field to determine if any of those strings
are contained within it.
It cycled fine, until I enclosed it in the CFLOOP query="judgement"...

I expected it to go to the first record in teh Judgement table..

Then loop through the strings to search for, perform the search...and then
drop out and CFQUERY LOOP back to the top..wher eit would go to the next
record...and do the same thing.

What's the problem with my code?

This is my output:

The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, ANSARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI

So it is clearly not cycling through the list of strings to search for.

-Gel


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Need assistance:Nested CFLOOPs

2001-03-21 Thread Angél Stewart

umm..judgement.defendant is changing..thats not the problem.

The problem is that it is not going over the list of words to search for.
The list called Company List.

So hence you see Limited,Limited,Limited Limited 7 times in the output.

When what you should see is

The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Ltd
The Defendant IS:MOHD, SARI
The Current List Item Is:Ltd.
The Defendant IS:MOHD, SARI
The Current List Item Is:CO
The Defendant IS:MOHD, SARI
The Current List Item Is:CO.
The Defendant IS:MOHD, SARI
The Current List Item Is:THE

etc. etc.
But it is just picking up that first list item, Limited..and although it is
going over the thing 7 times..its not reading the other items in the list.

I know there is some simple syntax error somewhere..I just can't find it.

-Gel



-Original Message-
From: Phoeun Pha [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 21 March 2001 12:59
To: CF-Talk
Subject: RE: Need assistance:Nested CFLOOPs


I just skimmed through it, and it seemed that your query output is not
right.

When u do a judgement.defendant inside that query loop, it will always
remain the same.  it will always output the first row from that query.
instead, just use defendant.  since you're already inside that query loop,
it will refer to the query name.  there is no need to specify it




-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 9:39 AM
To: CF-Talk
Subject: Need assistance:Nested CFLOOPs


Hi all.

I am having a problem with a nested CFLOOP refusing to loop!

The Code:



 The Defendant
IS:#judgement.defendant#


 The Current List Item
Is:#WordToGet#



  Hey! We Found A Company






I want to search the defendant field to determine if any of those strings
are contained within it.
It cycled fine, until I enclosed it in the CFLOOP query="judgement"...

I expected it to go to the first record in teh Judgement table..

Then loop through the strings to search for, perform the search...and then
drop out and CFQUERY LOOP back to the top..wher eit would go to the next
record...and do the same thing.

What's the problem with my code?

This is my output:

The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, ANSARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI

So it is clearly not cycling through the list of strings to search for.

-Gel



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Need assistance:Nested CFLOOPs

2001-03-21 Thread Hayes, David

Try setting a variable to judgement.defendant before entering the second
loop, then use that variable in the innner loop.

-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 9:39 AM
To: CF-Talk
Subject: Need assistance:Nested CFLOOPs


Hi all.

I am having a problem with a nested CFLOOP refusing to loop!

The Code:



 The Defendant
IS:#judgement.defendant#


 The Current List Item
Is:#WordToGet#



  Hey! We Found A Company






I want to search the defendant field to determine if any of those strings
are contained within it.
It cycled fine, until I enclosed it in the CFLOOP query="judgement"...

I expected it to go to the first record in teh Judgement table..

Then loop through the strings to search for, perform the search...and then
drop out and CFQUERY LOOP back to the top..wher eit would go to the next
record...and do the same thing.

What's the problem with my code?

This is my output:

The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, ANSARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI

So it is clearly not cycling through the list of strings to search for.

-Gel
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Need assistance:Nested CFLOOPs

2001-03-21 Thread Angél Stewart

That..uhh..doesn't help.

THe output I get is now:
Current Row is :1 The Defendant IS:MOHAMMED, ANSARI
The Current List Item Is:Limited
The Defendant IS:MOHAMMED, ANSARI
The Current List Item Is:Limited
The Defendant IS:MOHAMMED, ANSARI
The Current List Item Is:Limited
The Defendant IS:MOHAMMED, ANSARI
The Current List Item Is:Limited
The Defendant IS:MOHAMMED, ANSARI
The Current List Item Is:Limited
The Defendant IS:MOHAMMED, ANSARI
The Current List Item Is:Limited
The Defendant IS:MOHAMMED, ANSARI
The Current List Item Is:Limited
Current Row is :2 The Defendant IS:MOHAMMED, AZEEM
The Current List Item Is:Limited
The Defendant IS:MOHAMMED, AZEEM
The Current List Item Is:Limited
The Defendant IS:MOHAMMED, AZEEM

It still isn't cycling through the text list of things to find.
It is just reading the first value...but its reading it 7 times..which
suggests it is looping..but not going over the seperate values in the list.

This problem is driving me nuts!

It doesn't make sense!
The inner Index loop acts one way when its on its own, and another when I
place it within the CFQUERY loop..
To me my logic is sound..it seems to be either a CF quirk..or my syntax is
incorrect somewhere!

-Gel



-Original Message-
From: Kevin Gilchrist [mailto:[EMAIL PROTECTED]]

Try changing the beug code to

The ConpanyList set below doesn't need to be done for every row of the query
loop, so move it outside.





 Current Row is :#judgement.CurrentRow#

 The Defendant
IS:#judgement.defendant#


 The Current List Item Is:#WordToGet# 
 Courrent Counter is : #Counter#




  Hey! We Found A Company






-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]


Hi all.

I am having a problem with a nested CFLOOP refusing to loop!

The Code:



 The Defendant
IS:#judgement.defendant#


 The Current List Item
Is:#WordToGet#



  Hey! We Found A Company






I want to search the defendant field to determine if any of those strings
are contained within it.
It cycled fine, until I enclosed it in the CFLOOP query="judgement"...

I expected it to go to the first record in teh Judgement table..

Then loop through the strings to search for, perform the search...and then
drop out and CFQUERY LOOP back to the top..wher eit would go to the next
record...and do the same thing.

What's the problem with my code?

This is my output:

The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, ANSARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI

So it is clearly not cycling through the list of strings to search for.

-Gel


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Need assistance:Nested CFLOOPs PART 2

2001-03-21 Thread Phoeun Pha

oh, why the heck are u using CFOUTPUTs for every line break? heh.  u dont
have to do that

-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 9:39 AM
To: CF-Talk
Subject: Need assistance:Nested CFLOOPs


Hi all.

I am having a problem with a nested CFLOOP refusing to loop!

The Code:



 The Defendant
IS:#judgement.defendant#


 The Current List Item
Is:#WordToGet#



  Hey! We Found A Company






I want to search the defendant field to determine if any of those strings
are contained within it.
It cycled fine, until I enclosed it in the CFLOOP query="judgement"...

I expected it to go to the first record in teh Judgement table..

Then loop through the strings to search for, perform the search...and then
drop out and CFQUERY LOOP back to the top..wher eit would go to the next
record...and do the same thing.

What's the problem with my code?

This is my output:

The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, ANSARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI

So it is clearly not cycling through the list of strings to search for.

-Gel
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Need assistance:Nested CFLOOPs

2001-03-21 Thread Phoeun Pha

I just skimmed through it, and it seemed that your query output is not
right.

When u do a judgement.defendant inside that query loop, it will always
remain the same.  it will always output the first row from that query.
instead, just use defendant.  since you're already inside that query loop,
it will refer to the query name.  there is no need to specify it




-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 9:39 AM
To: CF-Talk
Subject: Need assistance:Nested CFLOOPs


Hi all.

I am having a problem with a nested CFLOOP refusing to loop!

The Code:



 The Defendant
IS:#judgement.defendant#


 The Current List Item
Is:#WordToGet#



  Hey! We Found A Company






I want to search the defendant field to determine if any of those strings
are contained within it.
It cycled fine, until I enclosed it in the CFLOOP query="judgement"...

I expected it to go to the first record in teh Judgement table..

Then loop through the strings to search for, perform the search...and then
drop out and CFQUERY LOOP back to the top..wher eit would go to the next
record...and do the same thing.

What's the problem with my code?

This is my output:

The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, ANSARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI

So it is clearly not cycling through the list of strings to search for.

-Gel
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Need assistance:Nested CFLOOPs

2001-03-21 Thread Kevin Gilchrist

Try changing the beug code to 

The ConpanyList set below doesn't need to be done for every row of the query
loop, so move it outside.





 Current Row is :#judgement.CurrentRow#

 The Defendant
IS:#judgement.defendant#


 The Current List Item Is:#WordToGet# 
 Courrent Counter is : #Counter#




  Hey! We Found A Company






-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 10:39 AM
To: CF-Talk
Subject: Need assistance:Nested CFLOOPs


Hi all.

I am having a problem with a nested CFLOOP refusing to loop!

The Code:



 The Defendant
IS:#judgement.defendant#


 The Current List Item
Is:#WordToGet#



  Hey! We Found A Company






I want to search the defendant field to determine if any of those strings
are contained within it.
It cycled fine, until I enclosed it in the CFLOOP query="judgement"...

I expected it to go to the first record in teh Judgement table..

Then loop through the strings to search for, perform the search...and then
drop out and CFQUERY LOOP back to the top..wher eit would go to the next
record...and do the same thing.

What's the problem with my code?

This is my output:

The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, ANSARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI

So it is clearly not cycling through the list of strings to search for.

-Gel
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Need assistance:Nested CFLOOPs

2001-03-21 Thread Angél Stewart

Hi all.

I am having a problem with a nested CFLOOP refusing to loop!

The Code:



 The Defendant IS:#judgement.defendant#


 The Current List Item Is:#WordToGet#



  Hey! We Found A Company 





I want to search the defendant field to determine if any of those strings
are contained within it.
It cycled fine, until I enclosed it in the CFLOOP query="judgement"...

I expected it to go to the first record in teh Judgement table..

Then loop through the strings to search for, perform the search...and then
drop out and CFQUERY LOOP back to the top..wher eit would go to the next
record...and do the same thing.

What's the problem with my code?

This is my output:

The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, ANSARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI
The Current List Item Is:Limited
The Defendant IS:MOHD, SARI

So it is clearly not cycling through the list of strings to search for.

-Gel


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists