This topic is locked

Generic Field

3/3/2008 2:48:51 PM
ASPRunnerPro General questions
K
kaled2006 author

<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=7766&image=1&table=forumtopics' class='bbc_emoticon' alt=':huh:' /> Hy
I have 3 field first one is username , first name and lastname
Example the user enter his first name and lastname. So a username will be created automatic from the firstname and lastname .
how can i do that
That you

Sergey Kornilov admin 3/4/2008

I think you can use BeforeAdd/BeforeEdit events and the following code:

dict("FullName") = dict("FirstName") & " " & dict("LastName")
K
kaled2006 author 3/4/2008

It`s working , but if the first name let`s say john and i would like to get only the first 3 letter how can i do
thank you

G
goomba 3/10/2008

It`s working , but if the first name let`s say john and i would like to get only the first 3 letter how can i do

thank you


Something like this will do it:
Left(txt,3)) Where TXT is the variable you want to extract the characters from.
For full list of VBscript functions look here: http://www.w3schools.com/vbscript/vbscript_ref_functions.asp