see Left() and split()

Code:
$name=@fullname
if instr($name,' ')
$left = left(split($name,' ')[0],7)
$right= left(split($name,' ')[1],1)
$shortname = $left+$right
endif
? $shortname


beware users with middle initials

of course if you are using Active directory, you can do this:
Code:
	$ldap		= TranslateName(1, @domain, 3, @ldomain+'\'+@userid, 1)
	$UserProperties = GetObject("LDAP://"+$LDAP[0])
	$FirstName	= $userProperties.FirstName
	$LastName	= $userProperties.LastName
	$left = left($FirstName,7)
	$right= left($LastName,1)
	$shortname = $left+$right
? $shortname

and include the translatename UDF



Edited by Radimus (2007-01-16 07:27 PM)
_________________________
How to ask questions the smart way <-----------> Before you ask