How do you change the primary key in a MicroSoft Dataverse table created in Teams?
@JonathanDavey1 No always will be a free text field. What you can do it is get the value from another field and apply into the primary field. In that case will always show the information in the lookup column of other table.
If my answer helped you, please give me a thumbs up (👍). If solve your question please mark as solution ✔️. This is help the community.
I want to populate the Primary Name with the a combination of two fields, like First Name and Last Name. How would a business rule look for this? Can I make a rule on table level, that always corrects the Primary Name field when there is a change in First or Last Name, or do I need to write a business process for each form. That it interacts with? How would this look in a canvas app?
THANKS
This can be done within your app. If you are using a Canvas app, you can create blank fields to display the data, and then use a formula such as "<<lookup column>>.selected.<<desired column>>" In your case say your lookup column in Purchase was called "IngredientName", you would have a blank field named "Unit", your formula on the Unit field would be IngredientName.selected.Unit.
If you are using a Model Driven app you would need to build an Automate flow that would trigger off of your lookup, and retrieve the values you wanted and populate them into your fields.
i have 2 tables , table 1 named as "ingredients" and table 2 is "purchase"....ingredients table is my primary table which contain "ingredient name(primary column)","quantity", "unit"(column names)...purchase table get values from ingredients table by look up .but values of the primary column of ingredients table is only getting as lookup , i want values from "quantity" column and "unit" column ..how can i get it ?
I'm afraid this cannot be changed, currently the default column used for lookups is always the Primary Name column.
@JonathanDavey1 If you want it to make readonly. you have that option on form. See below step.
1. Open the entity form (form name - main/name of your form)
2. You can mark this property so that user cant edit it manually/ Or simply hide this field. Add your custom field below on it and make it editable.
3. Now in You pre-Create Plugin copy the custom field value to Name field.
4. Now your custom value gets copied to Name field and same will reflect in the lookup.
My error, yes Primary Column can be set to OPTIONAL in EDIT Column. But not EDIT Table.
@JonathanDavey1 wrote:Is it possible to use a different column as the Primary Name column that appears in Lookup choices?
No
The challenge is what users enter TEXT into the Primary Name Column. Especially if it's a default REQUIRED column (in Teams).
In the field/column definition you can set it optional.
On the Form definition you can set it readonly (or by form Business Rule).
If you want it to be readonly and required then as suggested by another poster you can populate it via a "Pre" Plugin. If readonly and optional you can do via Pre/Post Plugin or (post) Workflow, or potentially Server-side Business Rule.
@JonathanDavey1 You have work around for your scenario. You can make primary name field as locked. Use a Business rule or pre create plugin to populate this field using the desiered value you want. Note that this field is marked as business required, but you can change that setting to optional.
Currently you cannot make another field visible in the related entity lookup. but can do above work around.
mmbr1606
22
Super User 2025 Season 1
stampcoin
17
ankit_singhal
11
Super User 2025 Season 1