cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thQS
Frequent Visitor

Sharepoint - Calculated field

Hi, 

 

Situation:

1 have 3 collums in a Sharepoint list. 

 

1. First_Name
2. Last_Name
3.Email

 

Problem:

I want the email collumn to be automatically calculated as     First_Name.Last_Name@companyname.com

The problem is that the spaces in last name stay in the e-mailadress. like John.De Bruicker@companyname.com

In Powerapps I can do this with Substitute(Input_Voornaam.Text&"."&Input_Familienaam&"@police.belgium.eu"," ",""), but I want to have it done in Sharepoint. 

 

Is there a way to have the spaces deleted?

1 ACCEPTED SOLUTION

Accepted Solutions
mahoneypat
Solution Sage
Solution Sage

Please try this expression using SEARCH and REPLACE

 

=IF(NOT(ISERROR(SEARCH(" ",Last_Name,1))),REPLACE(Last_Name,SEARCH(" ",Last_Name,1),1,"")&"."&First_Name&"@company.com",Last_Name&"."&First_Name&"@company.com")

 

Regards,

Pat

View solution in original post

2 REPLIES 2
mahoneypat
Solution Sage
Solution Sage

Please try this expression using SEARCH and REPLACE

 

=IF(NOT(ISERROR(SEARCH(" ",Last_Name,1))),REPLACE(Last_Name,SEARCH(" ",Last_Name,1),1,"")&"."&First_Name&"@company.com",Last_Name&"."&First_Name&"@company.com")

 

Regards,

Pat

View solution in original post

thQS
Frequent Visitor

I don't think I fully understand but it worked! 

Thx !

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (81,552)