RE: Using a counter variable

2002-11-26 Thread Mark A. Kruger - CFG
Aimee, A bit more info would be helpful. Are you trying to do this all in one request? what sort of variable is it? session? If it's a session variable then it's being reset to Zero with every request by the application.cfm page. You would need to do (with locking): cfif NOT

Re: Using a counter variable

2002-11-26 Thread charlie griefer
Clark, Aimee writes: I have an application in which I want every 7th record closed in a table to generate an email asking the user to participate in a survey. I have cfset counter = 0 in the application.cfm file. I have cfset counter = counter +1 in my action page right after an

RE: Using a counter variable

2002-11-26 Thread Clark, Aimee
have to admit, I'm still learning the best practices with respect to how I should be doing this. -Original Message- From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 26, 2002 3:24 PM To: CF-Talk Subject: RE: Using a counter variable Aimee, A bit more info would

RE: Using a counter variable

2002-11-26 Thread Clark, Aimee
for this type of scenario? -Original Message- From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 26, 2002 3:24 PM To: CF-Talk Subject: RE: Using a counter variable Aimee, A bit more info would be helpful. Are you trying to do this all in one request? what sort

RE: Using a counter variable

2002-11-26 Thread Mosh Teitelbaum
You haven't made your counter variable persistent. Every time someone makes a new request of your application, Application.cfm creates a new variable called counter and sets it equal to 0. You need to make your variable persistent. And since you want it to work across multiple users, it should

RE: Using a counter variable

2002-11-26 Thread Brian Ledwith
It's because your Counter variable isn't sticking around long enough to be incrementing... Try setting Counter as an Application variable in your Application.cfm page like this: cfif not isdefined(application.Counter) cfset application.counter=0 /cfif And on your action page, use this:

Re: Using a counter variable

2002-11-26 Thread Eric Dawson
[EMAIL PROTECTED] Subject: Re: Using a counter variable Date: Tue, 26 Nov 2002 14:43:48 -0700 Clark, Aimee writes: I have an application in which I want every 7th record closed in a table to generate an email asking the user to participate in a survey. I have cfset counter = 0

RE: Using a counter variable

2002-11-26 Thread Boardwine, David L.
have to admit, I'm still learning the best practices with respect to how I should be doing this. -Original Message- From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 26, 2002 3:24 PM To: CF-Talk Subject: RE: Using a counter variable Aimee, A bit more info

RE: Using a counter variable

2002-11-26 Thread Clark, Aimee
PROTECTED]] Sent: Tuesday, November 26, 2002 3:41 PM To: CF-Talk Subject: RE: Using a counter variable You haven't made your counter variable persistent. Every time someone makes a new request of your application, Application.cfm creates a new variable called counter and sets it equal to 0. You

Re: Using a counter variable

2002-11-26 Thread Dina Hess
, 2002 4:42 PM Subject: RE: Using a counter variable Mosh, I tried this and it did work, but, it's still showing my survey link even though the counter has been set back to 0. Can you tell why? cflock type=READONLY name=lckReadCounter timeout=20 cfset counter = application.counter

RE: Using a counter variable

2002-11-26 Thread Mosh Teitelbaum
PROTECTED]] Sent: Tuesday, November 26, 2002 5:42 PM To: CF-Talk Subject: RE: Using a counter variable Mosh, I tried this and it did work, but, it's still showing my survey link even though the counter has been set back to 0. Can you tell why? cflock type=READONLY name=lckReadCounter

RE: Using a counter variable

2002-11-26 Thread Eric Dawson
cfparam name=application.counter value=0 !-- increment counter -- cfset application.counter = (application.counter + 1) mod 7 cfif counter mod 7 eq 0 !-- increment counter -- Survey Link /cfif ~| Archives: