web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Primary Name - what's ...
Power Apps
Unanswered

Primary Name - what's that all about then?

(1) ShareShare
ReportReport
Posted on by

Can I just clarify something, the Primary name feild that is created by the CDS. Whats that all about?

 

Is it like sharepoint Title where thou shalt never muck about with it for fear of the sharepoint gods smiteing you at a later date, or is it ok to edit it and shape it?

 

Whats the best practice and its intended purpose?

 

I found this on the matter and it says that i 'May' update or change the field on saving the data for the first time, but does i mean that at a later point its going to break something?

 

On the entity details page, click or tap the Primary Name field to open the Primary Name panel, and then in the Display name box, replace Primary Name with Product Review. In the Name box, replace PrimaryName with ProductReview, and then click or tap Done.

By default, every entity contains a Primary Name field, which is used by lookup fields when establishing relationships with other entities. Typically the Primary Name field stores the name or primary description of the data stored in the entity. You may update the name and display name of the Primary Name field before saving the entity for the first time.

I have the same question (0)
  • Verified answer
    Kevin23 Profile Picture
    47 on at

    The primary name field is similar to the Title field in SharePoint in that its the clickable link to open the record (if you are using it in a D365 app). In all other ways, it is not like the Title field. Feel free to change its name to whatever you want. It won't break anything and the CDS gods will not reign down on you for all time. Once you've set the name, you can't change it though, if you get it wrong, you will need to recreate the entity.

     

    As for best practice, you should rename it to be representative of the data that you are storing in the field/entity. For example, if I had a Property entity, which was used to store the location details of properties in a portfolio, I would probably rename the Primary Field to Street Address, as its generally unique (but this is NOT a requirement of the Primary Field) and also a good way to identify the particular record in a list. 

  • Community Power Platform Member Profile Picture
    on at

    Thanks for that, its those little things that may have an impact over time that need a little clarification. Great and detailed explination so thanks.

  • BrianSlalomMS Profile Picture
    on at

    It appears that I can't change the primary_name field to a whole number, which is what I really want (so it will sort correctly in lists, among other reasons). My natural key field is a number.

    Given this, if I create a whole number field with my key value and I have no other natural key field which is text to put into the primary_name field, what should I put into this field? Its required to have a value.

    Do you recommend duplicating my whole number key field value as text in the primary_name field, so it can be used for lookups?

     

     

  • Community Power Platform Member Profile Picture
    on at

    Posted under incorrect login!

    Updated post coming.

  • Kevin23 Profile Picture
    47 on at

    You are correct in saying you can't change to a whole number, it must be text. I wrote another post yesterday on what you can do with the name field. Maybe you can get some ideas from it.

    https://powerusers.microsoft.com/t5/Common-Data-Service-for-Apps/How-to-autogenerate-Primary-Name-field-in-custom-CDS-Entity/td-p/170101

    In addition to those options if you just wanted to fill the field with a value of another field, you could use a Business Rule to copy the value from another field, that would be the easiest option.

  • BrianSlalomMS Profile Picture
    on at

    Thanks. I am trying to create a business rule to convert my number to text.

    What syntax is accepted in the Value field of a Set Field Value component?

    I've tried Text(Value(cr89e_ionumbertext.Text)) and just cr89e_ionumbertext.Text but each of these are just taken as literal string values and the field is set to that string.

    How do I specify that this is an expression which needs to be intepreted and executed?

     

    Where is the syntax reference doc for putting expressions in the Value field?

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard