Hi Paul, If all your project num is like you said:900166.11 900166.12 900168.00 900170.19 901007.02 901013.00 Not 900166.12.002.001
I would use: <cfset num="900166.12"> <cfset StrNum=replace(num,"." ,"","all")> <cfset ValNum= Val(StrNum)> <cfoutput>#valNum#</cfoutput> This will get 90016612 <cfset NewNum=valNum +1> <cfoutput>#newNum#</cfoutput> This will give you 90016613 Then insert the dot back . Otherwise as you have done you could continue with : <cfset LastNumber="003"> <cfset num= right("#lastNumber#",1)> <cfset num=num+1> <cfoutput>#num#</cfoutput> This will give 4 , then you can put it back to the lastNumber. HTH Sima -----Original Message----- From: Paul Ihrig [mailto:[EMAIL PROTECTED]] Sent: Monday, October 29, 2001 4:33 PM To: CF-Talk Subject: RE: Val :: IncrementValue by 01 NOT 1? how? Sima i grabed the last number after the "." apendad it by 1 then grabed the first set of numbers manualy added the periond, then the last 2 digits & re inswerted it into the table. i thought i was treating the last number as a string? <cfset firstnumber = listfirst(#FORM.Proj_Num#,".")> <cfset lastnumber = listlast(#FORM.Proj_Num#,".")+01> <cfset MyNum = "#firstnumber#.#lastnumber#"> if i use increment value it always put in 1 which = .1 not .01 most my numbers in my origional table are Project_Num_Number 900166.11 900166.12 900168.00 900170.19 901007.02 901013.00 so if it is .00 i need .01 if .19 then i need .20 to make it even funner sone project numbers have 900170.19.56 2 deciamal places. thank you -paul -----Original Message----- From: Sima Lee [mailto:[EMAIL PROTECTED]] Sent: Monday, October 29, 2001 4:26 PM To: CF-Talk Subject: RE: Val :: IncrementValue by 01 NOT 1? how? Hi Paul, Can you treat the lastnumber as a string again and take the last number of the lastNumber and increase it? Or: Did you try to take off all the "." and treat it as a number increase it by 1, then insert the dot back. Of course you have to remember how many dots you have took off and the positions in the string. HTH Sima -----Original Message----- From: Paul Ihrig [mailto:[EMAIL PROTECTED]] Sent: Monday, October 29, 2001 3:27 PM To: CF-Talk Subject: Val :: IncrementValue by 01 NOT 1? how? ok i can do this <cfoutput> <cfset firstnumber = listfirst(#FORM.Proj_Num#,".")> <cfset lastnumber = IncrementValue(listlast(#FORM.Proj_Num#,"."))> <cfset MyNum = "#firstnumber#.#lastnumber#"> <CFSET Proj_Num2 = #MyNum#> </cfoutput> But how do i make it insert 01 instead of 1? -paul ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.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