Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Left or Right usage

Status
Not open for further replies.

TomLon

Technical User
Jul 19, 2002
48
0
0
US
I have a field (for instance nName)that stores a persons name (Steve Jones). In another field, I need to extract the person's first inital and last name (sjones). What formula would I use to extract that?

This is going to be part of a greater solution. I have an application that has to generate a unique record. The format was originially going to QAR-1, QAR-2, QAR-3, etc. That was going to ber a no brainer. Until i was told that this was going to be a replicated database. Hence I do not know if a decent way to issue unique records in a replicated database without having the user replicate after every record. So, I decided to have the unique record comprise of QAR-SJONES-01, QAR-SJONES-02, etc. I assume that with the user having all of their own records locally at any given time, this should be acceptable. Now, form a sort standpoint, is it better to have QAR first or have the usercredentials first?

Now if anyone has a better solution to create a unique value that is numerical, I would love to hear it.

Thank you very much.
 
What I did may help you. I separated the first and last name, made them both different fields (fname and lname). The next step may be useless, but I like to seperate functions.

I made a computed text field called fextract whose formula is @left(fname;1). I then created another computed for display text field called uniquename - @Left(fextract+lname;@length(lname+1)). The output of uniquename is the first initial and the whole last name. I hope this helps, and this may even be a little too much for your solution!

Sincerely,
D. Jonathan Luman
 
Thanks, but I am not sure if I am able to seperate the field as this filed is computed to display the Given Name of the user (the value property = @Name([G];@Author) ) so I am not sure if I can seperate it.

Thanks
 
@Left(field;1) + @LeftBack(field;" ")

This should work if last names are not composed of several (you know, marriage naming issues) and seperated by spaces instead of dashes.

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top