Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Strip first and last name from email address

I wanted the first and last name removed from our company email address and have each name Capitalised.  Thanks to Text.Proper:

 

let
Name = (email as any) =>
let
Source = if email = null then
""
else
Text.From(email),
removeDomain = Text.BeforeDelimiter(email,"@"),
replaceDot = Text.Replace(removeDomain,"."," "),
fullName = Text.Proper(replaceDot)
in
fullName
in
Name

  • Anonymous's avatar
    Anonymous
    7 years ago

    I am just sharing and found this to be a simple solution to the problem.

     


     

2 Replies

  • v-piga-msft's avatar
    v-piga-msft
    Icon for Resident Rockstar rankResident Rockstar

    Hi Anonymous ,

    I have a little confused about your scenario.

    Is this a problem or a sharing?

    If this is a problem, could you share some data sample and your desired output so that we could help further on it?

    Best  Regards,

    Cherry

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      I am just sharing and found this to be a simple solution to the problem.