Would this work for you?
<cfif (Now() GT GetSubjects.BegQuarter) and (Now() LT
GetSubjects.DistributionDate)>
<cfset client.GradingPeriod = GetSubjects.Quarter>
<INPUT TYPE="Text" NAME="Grade" VALUE="#Grade#>
<cfelse>
#UCase(Grade)#
</cfif>
----- Original Message -----
From: "Janine Jakim" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, July 18, 2001 8:54 AM
Subject: how do i condense this?
I have a display page that I want the user to update if it is the
current
quarter. How do I make my code more efficient then this stuff I
have???
The only way I've gotten it to work is when I hard code the quarter-
what's
the best way to get rid of all of these cfif/cfelseif statements?
Thanks for any help
<CFLOOP INDEX="X" FROM="1" TO="#ListLen(Quarter)#">
<CFIF (Now() GT GetSubjects.BegQuarter) and (Now() LT
GetSubjects.DistributionDate) and (GetSubjects.Quarter EQ 1) ><CFSET
CLIENT.GradingPeriod=1>
<INPUT TYPE="Text" NAME="Grade" VALUE="#Grade#>
<CFELSEIF (Now() GT GetSubjects.BegQuarter) and (Now() LT
GetSubjects.DistributionDate) and (GetSubjects.Quarter EQ 2) ><CFSET
CLIENT.GradingPeriod=2>
<INPUT TYPE="Text" NAME="Grade" VALUE="#Grade#>
<CFELSEIF (Now() GT GetSubjects.BegQuarter) and (Now() LT
GetSubjects.DistributionDate) and (GetSubjects.Quarter EQ 3) ><CFSET
CLIENT.GradingPeriod=3>
<INPUT TYPE="Text" NAME="Grade" VALUE="#Grade#>
<CFELSEIF (Now() GT GetSubjects.BegQuarter) and (Now() LT
GetSubjects.DistributionDate) and (GetSubjects.Quarter EQ 4) ><CFSET
CLIENT.GradingPeriod=4>
<INPUT TYPE="Text" NAME="Grade" VALUE="#Grade#>
<CFELSE>#UCase(Grade)#
</CFIF>
-----Original Message-----
From: Raymond Camden [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 8:45 AM
To: CF-Talk
Subject: RE: Scoping Variable
CF automatically will search up if you only use "q". If you don't
want that,
then specify URL.Q, or Variables.Q, or whatever. If you _want_ it to
scope
up, just use "q".
======================================================================
=
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia
Email : [EMAIL PROTECTED]
ICQ UIN : 3679482
"My ally is the Force, and a powerful ally it is." - Yoda
> -----Original Message-----
> From: Michael Lugassy [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 18, 2001 9:35 AM
> To: CF-Talk
> Subject: Scoping Variable
>
>
> how do I enforce CF to use only "url.q" and not simply "q"
> i.e - how to ask cf to search for scoping on every variable?
> where is it in the administrator?
>
> Thanks,
>
> Michael
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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