Jazz up your apps with Images for the Common Data Service! (Previous Version)
We are extremely pleased to announce the support for images in the Common Data Service! Support for images has been one of the top asks from customers since General Availability, and we're happy to say we heard you! With this new work, you can add a field of data type Image to your entities and use those when building your apps with PowerApps. We also have multiple standard entities that also have image fields such as Product entity which you can consume in your app.
Adding an image field
You can add an image field to custom or standard entities. Here are the steps to do that:
- On http://web.powerapps.com, expand the Common Data Service section and click or tap Entities in the left navigation pane. Your list of entities appears.
- Click or tap an entity, and then click or tap Add field near the top of the screen. You can filter the list by typing one or more characters in the search bar.
- Under Display name, specify the string of text that will identify the field to users.
- Under Name, specify the string of text that you will use to refer to the field in, for example, a formula when you build an app.
- Under Type, specify the type of data as Image .
- Click or tap Save to submit your changes.
- image fields can be marked as required, however they can’t be marked as unique or searchable
- image fields also cannot be part of Default lookup field group and key of the entity
- images cannot be viewed through the Entity "Data" tab or in the Excel Add-in functionality.
Consuming image fields in an app
You can bind the image field on the entity to a display form or gallery control in PowerApps. The stored image will be rendered on the form/gallery.
You can choose any of the following layouts for the gallery control to display an image and then set the Image property to image field:
- Image and title
- Image, title, and subtitle
- Image, title, subtitle, and body
For the display form control, in the right-hand pane under the “Data” tab click or tap the checkbox for image field to render the image. The card type for the field should be set to “View Image”. To change the order of fields displayed in the form you can drag the Image field on the right pane.
You can upload an image into the entity through the image upload control in edit form control. In the right-hand pane under the “Data” tab click or tap the checkbox for image field. The card type for the field should be set to “Add Picture”. When you run the app, the image can be uploaded through “tap or click to add a picture” option. You can also update or remove an existing image.
Alternatively, you can build a PowerApp via the App from Data experience on the CDS entity with the image field. This will render the image in the browse screen and details screen, and provides thbe ability to upload an image through image control in edit screen.
Later this year we will be adding support for bulk import of images through the data import functionality so stay tuned for that! Additionally, we are looking at adding support for viewing images in the data tab under entities.