I have a field in the following format (Last Name, First Name) ie: Hamilton, Lewis.
But the User().FullName
function will only return Lewis Hamilton.
How can I get these two equal to each other? Any workarounds?
I have a field in the following format (Last Name, First Name) ie: Hamilton, Lewis.
But the User().FullName
function will only return Lewis Hamilton.
How can I get these two equal to each other? Any workarounds?
One option could be to use a formula similar to this to re-write the "LastName, FirstName" field match the User().FullName field :
With(
{
NewValue: TrimEnds(
Split(
Label1.Text, //update with your label name
","
)
)
},
$"{Last(NewValue).Result} {First(NewValue).Result}"
)
However there could be some unexpected results if a name has a comma in it for some reason.
If that may be an issue, a more robust way may be to get the user details from Azure AD (or some other identity provider) and use the firstName and surname fields to do something similar to my formula above.