Forum Discussion
SSantos
Aug 25, 2022Copper Contributor
JSON column formatting extract first and last name from @me
Can we extract other information from me? For example, rather than getting the email address, I'd like to only display the First and/or Last names. I tried @me.givenname and others but didn't work. ...
SSantos
Aug 25, 2022Copper Contributor
This is the best I can find to extract first and last name, hopefully all email addresses have the same convention.
https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/formatting-syntax-reference
replace(substring(@me, 0, indexOf(@me, '@')), '.', ' ')
DoraL420
Jul 17, 2023Copper Contributor
This code worked brilliantly for me, however there was a slight issue. If the logged in user's email is not already capitalised in the format Firstname.Lastname@... the code won't capitalise the first letters. Is there possibly a work around that would capitalise the letters of a name from the email format firstname.lastname@... ?