Or you can use

StructKeyExists(form,"fieldname")

HTH,

Sam

----- Original Message -----
From: "CF-DEV" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, October 31, 2002 2:31 PM
Subject: RE: Need assistance with listbox on a form


> On the action page test to see if the value exists:
> ISDEFINED()
>
> -----Original Message-----
> From: Clark, Aimee [mailto:aclark@;stinsonmoheck.com]
> Sent: Thursday, October 31, 2002 2:14 PM
> To: CF-Talk
> Subject: Need assistance with listbox on a form
>
>
> I have a page in which employees can update information that is contained
in
> their record in my SQL table. I recently added a multi-select list box
with
> a list of foreign languages that they can choose from if it's applicable
to
> them.
>
> If a user selects a foreign language and submits their changes, it works.
>
> If they change their address, but don't speak a foreign language and the
> list box doesn't have anything selected, then they get this lovely error
> message:
>
> GetOld.FLanaguage IS ""
>
>
> Error near line 126, column 24.
>   _____
>
>
> Error resolving parameter GETOLD.FLANAGUAGE
>
>
>
> The column FLANAGUAGE is not present in the query named GETOLD. It is
likely
> that you have misspelled the name of the column.
>
>
>
>
> The error occurred while processing an element with a general identifier
of
> (CFIF), occupying document position (126:1) to (126:30).
>
> Ok, so FLangauge is a field in the query, so it isn't that. Here's the
piece
> of the page where it's failing at:
>
> <cfif GetOld.FLanaguage IS "">
>  <cfset chgFLanguage = "">
> <cfelseif GetOld.FLanguage IS NOT '#FLanguage#'>
>  <cfset chgFLanguage = #FLanguage#>
> </cfif>
>
> Is the reason why I am having this problem have to do with the fact that
> this is a multi-select list box and if so, how do I correct this to make
> this work correctly?
>
> For anyone who wants to see the code for the list box it is:
>
>  <tr>
>         <td><b>Foriegn Languages You May Speak:</b></td>
>         <td><cfselect name="FLanguage" size="5" multiple>
>           <CFOutput query="GetLanguages">
>               <CFIF
> ListFindNoCase(EditNameQry.FLanguage,GetLanguages.LanguageName)>
>                 <CFSET PGSelected ="Selected">
>             <CFELSE>
>           <CFSET PGSelected ="">
>             </cfif>
>            <Option #PGSelected#
> value="#LanguageName#">#LanguageName#</option>
>           </cfoutput>
>         </cfselect></td>
>     </tr>
>
> Thank you,
>
> Aimee Clark
> Web Developer
> Stinson Morrison Hecker LLP
> [EMAIL PROTECTED]
>
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to