Share via

username() function

Anonymous
2012-02-03T04:14:56+00:00

Hello, I have a form that uses the userName() function.

our user names are in the  FirstName.LastName format. I would like to seperate the users name in two different field

IE: field1 = FirstName, field2 = LastName.

Microsoft 365 and Office | Install, redeem, activate | For home | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2012-02-09T04:11:46+00:00

    Thanks you this works great

    i would also like to change the first letter of this field to be in upper case

    this is the formula i have

    concat(substring(translate(userName(), "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"), 1, 1), substring(userName(), 2, string-length(userName()) - 1)) (this formula works fine)

    substring-before(userName(), '.')

    I would like the first letter to be upper case and if possible put have the first letter of a hypenated name in upper case

    ie:

    FirstName field= First-Name

    LastName field = Last-Name

    hope you can help me with this

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2012-02-06T17:19:06+00:00

    Use default value formulas:

    FirstName: substring-before(userName(), '.')

    LastName: substring-after(userName(), '.')

    Was this answer helpful?

    0 comments No comments