Hey all,

I figured out how to do this, and whew! It wasn't easy. And it doesn't
make sense to me..but it works.

<CFSET CurrentDate= #StartDate#>

<cfloop CONDITION="#CurrentDate# LTE #EndDate#">
        
        
        <CFIF
IsDefined("Client.Comment_#Evaluate("#DateFormat(CurrentDate,'mmddyyyy')
#")#")>
                <CFSET clientvar =
"Comment_#Evaluate("#DateFormat(CurrentDate,'mmddyyyy')#")#">
                <CFSET temp = DeleteClientVariable(ClientVar)>
                
        </CFIF>
        
<CFSET CurrentDate=DATEADD("d",1,#CurrentDate#)> <!--- Advance the
current date by one day --->
<CFSET CurrentDate = DateFormat(#CurrentDate#,'mm/dd/yyyy')>

</CFLOOP>

I had to se the variable first, and then call it in the
DeleteClientVariable function.
Totally crazy, but it worked.

Also, in ANOTHER deleteclientvariable statement, I had to use QUOTES
around the variable name, whereas you would notice in this one I did
not. More weirdness :(

Here is the code for the other one which involves a WDDX thingy.
(special thanks to Sandy for showing me this neat code :) )

CFIF ISDefined("client.EquipmentForm")> <!--- Make sure that equipment
has been entered --->

<cfwddx action="WDDX2CFML" input="#Client.EquipmentForm#"
output="EquipmentForm">


<cfloop index="counter" from="1" to="5" step="1">

        <!--- CHeck if Select Box is empty. If not then insert values,
otherwise loop again --->
        <cfif len(evaluate('EquipmentForm.chooseequip#counter#'))>

        
                <cfquery name="InsertEquipment" datasource="relora"
dbtype="Oracle80">
        
        
                        INSERT INTO tblEquipEntry 
                        
                        VALUES
(tblequipentry_seq.nextval,#TheMainID#,'#Evaluate('EquipmentForm.choosee
quip#counter#')#',#Evaluate('EquipmentForm.hours#counter#')#)
                        
                        </cfquery>
        
        </cfif>
        
        
</CFLOOP> 

<CFSET temp = DeleteClientVariable('EquipmentForm')>

</CFIF> 

See? I had to wrap EquipmentForm in single quotes for it to work! 
Totally weird! :-\

-Gel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
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