Sometimes you need to write names to the database in proper case ("bill gates" => "Bill Gates").
This tutorial will show you the steps you need to follow.
Steps:
Open your ASPRunner/PHPRunner project and proceed to Events tab
Click on Before Record Updated Event for Edit page
Modify sample event code putting to appropriate place following code snippets
ASPRunner Example
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
These changes will apply to UserName field. Now, this field will be written to the database using capitals where
appropriate. For example, after adding new user "sam fowler" new record will be created
with "Sam Fowler" value in UserName field.
Note: Changes in SQL Query maybe different according to database used.
For example, for MSSQL, MySQL, Oracle and Postgre SQL databases you should use
Upper operator instead of Ucase.