Instead of using CF to determine if one of the students left school or whatever,
why not let your sql handle that for you.




"Success is a journey, not a destination!!"



Doug Brown
----- Original Message -----
From: "Janine Jakim" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, April 16, 2002 6:49 AM
Subject: Quick cfif/cfset question


> I am using cfset for an array output (for activepdf) so I set each variable
> like so.
> <CFSET GR1=PDFToolkit.SetFormFieldData("GR1", "#GetGrades.Grade[1]#", 0)>
> <CFSET GR2=PDFToolkit.SetFormFieldData("GR2", "#GetGrades.Grade[2]#", 0)>
> The problem is if a student leaves and doesn't have grades for the next
> quarter
> An error occurred while evaluating the expression:
>
>  Qrtr3GR1=PDFToolkit.SetFormFieldData("Qrtr3GR", "#GetGrades.Grade[154]#",
> 0)
> Error near line 162, column 7.
> ----------------------------------------------------------------------------
> ----
>
> The element at position 154 in dimension 1 of object "GetGrades.Grade"
> cannot be found. The object has elements in positions 1 through 153. Please,
> modify the index expression.
>
> I did an cfif statement
> <CFIF NOT IsDefined ("GetGrades.Grade[154]")>
> OR
> <CFIF ("GetGrades.Grade[154]") NEQ "">
> I get
> Parameter 1 of function IsDefined which is now "GetGrades.Grade[154]" must
> be a syntactically valid variable name
>
> So how do I check and see if there is element there or not
> Thanks
> J
> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to