| Editorial Team
This blog will help you to understand how to map fields from one entity to another in Model Driven apps.
I will be using the out-of-the-box Account Entity and a custom Order entity.
In order entity, I have added these attributes to show you the mapping between account and order:
- Order Number (String)
- Customer (Lookup of Account table)
- Customer Type – Choice Column (Individual/Business)
- Phone (Number)
- Product (String)
- Quantity (Number)
- Total Amount (Number)
Customer, Customer Type, and Phone will be common in both entities so that I will map these fields.
- Go to make.powerapps.com
- Log in with your Microsoft Personal or Work account, Select the Environment, and then go to “Apps”
- When you click on “New App”, select the Model-Driven and It will open the below Screen.
- Add the name of your app and create.
-
Choose the out-of-the-box Dataverse table Account and the one we created – Order.
- On the Account form, add a sub-grid of the Order table.
- Now we will go to settings, Customizations and Customize the System
- Now, navigate to the source entity from which we want to map fields to another target entity.
- Go to 1: N Relationship and go to the relationship of account table with Order.
- Now go to “Mapping” on the left-hand sidebar.
- Click ‘New’ and add a new mapping of the ‘Customer Type’ and ‘Phone’ fields. Select the same field on both entities. And click ‘OK’
-
Now go to your App and create a new Order from the sub-grid. It will populate the data in the quick-create form.
The Field Level Mapping Restrictions
Here are a few things you should know about field-level mapping before you get started:
- Fields must be the same type and format.
- You can only apply field-level mapping to a field once.
- This will not work with hidden fields: the source field must be visible on the form.
- For Option Sets to be mapped, they must have matching integer values (not just matching text!) (Global option sets make this simple!)
So, that is how you can map fields efficiently rather than manually adding the data.