Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How do I create a field with "FirstName LastName" formatting based on another field that has "LastName, FirstName" formatting"?

Posted on by Microsoft Employee

I have a field called SalesRep that gets populated from QuoteWerks and is read-only.  How do I create another field with "FirstName LastName" formatting that gets populated based on the SalesRep field?  Is it possible to do this with a calculated field?  If not, any workaround suggestions?

Thank you.

*This post is locked for comments

  • Martin Donnelly Profile Picture
    Martin Donnelly 1,010 on at
    RE: How do I create a field with "FirstName LastName" formatting based on another field that has "LastName, FirstName" formatting"?

    I'm not sure what the others have read into this question but, I guess it depends what's in the SalesRep field and its data type.  If it's a string with more than first name last name then, you have to parse it.  Otherwise, you already have a what you want -- the SalesRep field.  If it's a lookup it's (EntityReference)SalesRep.Name -- which you will still have to parse.  On the client side it's something like formContext.GetControl("salesrep").GetAttribute()[0].name.

  • kunalks2003 Profile Picture
    kunalks2003 315 on at
    RE: How do I create a field with "FirstName LastName" formatting based on another field that has "LastName, FirstName" formatting"?

    if you are on 9.1 you can use PCF framework to create a Control

    Some example :

    community.dynamics.com/.../pcf-control-countdowntimer

  • Verified answer
    Kokulan Profile Picture
    Kokulan 18,048 on at
    RE: How do I create a field with "FirstName LastName" formatting based on another field that has "LastName, FirstName" formatting"?

    You might have already seen my response on your other post but in case you have not seen that, please try the updated CWA to get the User by new name format

    github.com/.../releases

    Update: You can pull the latest code as well now, I have pushed it to master branch

    https://github.com/Kokulan365/GetUserByName/tree/master/Workflows

  • Suggested answer
    T.I.A Profile Picture
    T.I.A 1,760 on at
    RE: How do I create a field with "FirstName LastName" formatting based on another field that has "LastName, FirstName" formatting"?

    Composite fields can only be used with the name fields and the address fields. Creating custom fly out field isn't possible. You could follow guide's advice if you need an alternative

    [View:https://community.dynamics.com/crm/f/117/t/213958]

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans