This topic is locked

Proper case event

11/16/2009 2:03:05 PM
ASPRunnerPro General questions
author

I want to use the proper case event listed here (http://www.xlinesoft.com/articles/tabledata_proper_case.htm), but it doesn't work. I am using Asprunnerpro 6.1 and the problem may be that there is no "Custom Code" option in the Add Action popup. The field I want to convert is the vActionTaken field, a text field 120 characters in length. I'm using MS SQL Server 2005.
Any help? Thanks.

J
Jane 11/17/2009

Hi,
just add following code to the Before record added/Before record updated events on the Events tab:

str = values("UserName")

for i=1 to len(str)

if (i=1) then

b = true

else

b = ( Mid(str, i-1, 1)=" " )

end if

if b then _

str = left(str, i-1) & UCase(Mid(str, i,1)) & Mid(str, i+1)

next

values("UserName")=str