Also, with the code you sent to the list, if both qAwards.Photo and
qAwards.Photo2 exist, the list will only contain the value of
qAwards.Photo2.  That's because both if ListAppends append the value to
Temp.  You might instead do something like:

        <cfset temp = "">
        <cfif IsDefined("qAwards.Photo") AND qAwards.Photo is not "">
                <cfset Item1 = "'"&CLIENT.root&"contentphotos\"&qAwards.Photo&"'">
                <cfset temp = listappend(temp,item1)>
        </cfif>
        <cfif IsDefined("qAwards.Photo2") AND qAwards.Photo2 is not "">
                <cfset Item2 = "'"&CLIENT.root&"contentphotos\"&qAwards.Photo2&"'">
                <cfset temp = listappend(temp,item2)>
        </cfif>

        <CFOUTPUT>#temp</CFOUTPUT>

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


> -----Original Message-----
> From: Bosky, Dave [mailto:Dave.Bosky@;htcinc.net]
> Sent: Tuesday, November 05, 2002 4:11 PM
> To: CF-Talk
> Subject: RE: appending to a list>
>
>
> Everytime I post a question the answer seems to come to me the
> second after
> hitting send.
>
> Thanks,
> Dave
>
>
> -----Original Message-----
> From: Randell B Adkins [mailto:AdkinsR@;GAO.GOV]
> Sent: Tuesday, November 05, 2002 3:54 PM
> To: CF-Talk
> Subject: Re: appending to a list>
>
>
> Output Temp2 and see what you get
>
> >>> [EMAIL PROTECTED] 11/05/02 03:36PM >>>
> Can someone tell me why the code below refuses to create a list? Both
> items
> do exist.
> I can print out each individual item but when I try to add each item to
> the
> list they never get appended.
>
>       <cfset temp = "">
>       <cfif IsDefined("qAwards.Photo") AND qAwards.Photo is not "">
>               <cfset Item1 =
> "'"&CLIENT.root&"contentphotos\"&qAwards.Photo&"'">
>               <cfset temp2 = listappend(temp,item1)>
>       </cfif>
>       <cfif IsDefined("qAwards.Photo2") AND qAwards.Photo2 is not "">
>               <cfset Item2 =
> "'"&CLIENT.root&"contentphotos\"&qAwards.Photo2&"'">
>               <cfset temp2 = listappend(temp,item2)>
>       </cfif>
>
> Dave
>
>
> HTC Disclaimer:  The information contained in this message may be
> privileged and confidential and protected from disclosure. If the reader
> of this message is not the intended recipient, or an employee or agent
> responsible for delivering this message to the intended recipient, you
> are hereby notified that any dissemination, distribution or copying of
> this communication is strictly prohibited.  If you have received this
> communication in error, please notify us immediately by replying to the
> message and deleting it from your computer.  Thank you.
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to