Part 1 of series explains how to create entity, field, relationships and import data. In this blog we will see how CDS for Apps automatically creates entity for you while importing data. We will make use of below excel data to add Products for Companies. Same is uploaded to one-drive.

Product Name Company Expired Expiration Date
HCL_P1 HCL No
HCL_P2 HCL No
Microsoft_P1 Microsoft Yes 1-Jan-18
Microsoft_P2 Microsoft No
Microsoft_P3 Microsoft No
Microsoft_P4 Microsoft No
Power_P1 Power Objects Yes 1-Mar-18
Power_P2 Power Objects Yes 1-Jun-18
Power_P3 Power Objects No

Steps:

  • Login to PowerApp web portal. Navigate to Data -> Entities and Click on Get Data

CDS21

  • Select Excel from list of data source, enter Product excel file url. Refer Part 1 to know how to get excel file URL and use it. Click on Next

CDS22

  • Select Table1 and Click Next
  • Product data will be displayed. Power Query allows us to modify column names, types, add or remove columns or any other transformations. We will change data type for column “Expiration Date” to Date/Time/Zone

Note – Currently CDS for Apps does not accept Date or Date/Time, so you need to convert your date type columns to Date/Time/Zone type.

  • Click on image button ABC/123 left next to Expiration Date and select Date/Time/Zone

CDS23

  • Expiration Date column data will be transformed to have time and time zone part. Also you will see one transformation step added on right side under Applied Steps. Which means for each transformation Power Query will add step under Applied Steps and you can always go back to previous state by selecting previous step. Click Next

CDS24

  • Select “Load to new entity” option. Provide entity name, entity display name and select Primary Name field in drop down. Click Next

CDS25

  • Entity will be created and data will be imported, Click Done. Select Entities on left navigation and change default view to custom on top to display only custom entities. You will see new entity created as “Company Product”.

Note – If entity is not displayed, refresh page once

CDS26

  • Select “Company Product” entity and Click on Data tab to see imported data

CDS27

Part 1

Part 3