Skip to content

Commit 5c503d7

Browse files
committed
1 parent 71591d9 commit 5c503d7

File tree

4 files changed

+30
-9
lines changed

4 files changed

+30
-9
lines changed

powerapps-docs/maker/common-data-service/display-custom-icons-instead.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Display custom icons alongside values in list views with PowerApps | MicrosoftDocs"
33
description: "Learn how to display custom icon graphics in a view"
44
ms.custom: ""
5-
ms.date: 02/14/2019
5+
ms.date: 11/20/2019
66
ms.reviewer: ""
77
ms.service: powerapps
88
ms.suite: ""
@@ -29,23 +29,24 @@ search.app:
2929

3030
PowerApps environment administrators and customizers can add graphics to a view and establish the logic used to select a graphic based on the column value using JavaScript. The capability lets you customize list views that display icons alongside text or numerical values.
3131

32+
This example displays custom icons in a view for the opportunity entity, which is available with certain apps, such as Dynamics 365 Sales. You can display custom icons in views with other standard entities, such as the account or contact entity, as well as custom entities.
33+
3234
> [!div class="mx-imgBorder"]
3335
> ![](media/icon-in-opportunity-view.png "All Opportunities view with Rating column displaying icons and text value")
3436
35-
> [!NOTE]
36-
> Grid icons are only shown in the web interface. They are not shown in [!INCLUDE[pn_Outlook_short](../../includes/pn-outlook-short.md)] or the mobile app.
37+
Custom icons in list views can display in Unified Interface, legacy web client, mobile app, and App for Outlook.
3738

38-
### Add custom graphics and JavaScript as web resources
39+
## Add custom graphics and JavaScript as web resources
3940

4041
1. Create the new graphic files needed for your customization. We recommend an icon size of 16x16 pixels (larger images will be scaled down).
4142

42-
2. Write one or more JavaScript functions that establish which icons to show for which values (you'll typically need one function for each column you want to customize). Each function must accept a row data object and a language (LCID) code as input and return an array containing an image name and tooltip text. For an example function, see [Sample JavaScript function](#SampleJavascript), later in this topic.
43+
2. Write one or more JavaScript functions that establish which icons to show for which values (you'll typically need one function for each column you want to customize). Each function must accept a row data object and a language (LCID) code as input and return an array containing an image name and tooltip text. For an example function, see [Sample JavaScript function](#SampleJavascript), later in this article.
4344

44-
3. Sign into your environment as an administrator and open solution explorer.
45+
3. Sign into your environment as an administrator and open [solution explorer](../model-driven-apps/advanced-navigation.md#solution-explorer).
4546

4647
4. The **Default Solution** pop-up window opens. Navigate to **Components** > **Web Resources** here.
4748

48-
5. Now, you'll upload your custom graphics, one at a time, as web resources. Select the **New** button in the toolbar to create a new web resource. Another pop-up window opens to help you create the resource. Do the following:
49+
5. Now, you'll upload your custom graphics, one at a time, as web resources. Select the **New** button in the toolbar to create a new web resource. Another pop-up window opens to help you create the resource. Follow these steps:
4950

5051
1. Give the new resource a meaningful **Name**. This is the name that you'll use to refer to each graphic from your JavaScript code.
5152

@@ -89,7 +90,7 @@ search.app:
8990

9091
14. Repeat these steps for each entity, view, and column as needed.
9192

92-
15. When you are ready, select **Publish All Customizations** to publish your changes. Then, close the **Default Solution** window.
93+
15. When you're ready, select **Publish All Customizations** to publish your changes. Then, close the **Default Solution** window.
9394

9495
<a name="SampleJavascript"></a>
9596

@@ -156,7 +157,27 @@ function displayIconTooltip(rowData, userLCID) {
156157

157158
<!-- This results in displaying icons with tooltips in the **Rating** column that depend on the value in each row. The result could look like this:
158159
159-
![Custom column graphics example](../customize/media/custom-column-graphics-example.png "Custom column graphics example") -->
160+
![Custom column graphics example](../customize/media/custom-column-graphics-example.png "Custom column graphics example") -->
161+
162+
## Custom icon view display behavior
163+
### Primary fields
164+
In the grid list view, custom icons applied to the entity primary field replace the default system-generated icon.
165+
166+
> [!div class="mx-imgBorder"]
167+
> ![](media/mobile-primary-field-custom-icon-display.png "Primary field replaces default icon in the custom icon view")
168+
169+
### Other fields
170+
In the grid list view, custom icons applied to a field that isn't the entity primary field display as a secondary icon in addition to the default system-generated icon.
171+
172+
> [!div class="mx-imgBorder"]
173+
> ![](media/card-form-not-primary-field.png "Not an entity primary field custom icon view")
174+
175+
### Card forms
176+
Custom icons replace the default system-generated icon when the view is configured to use a card form.
177+
178+
> [!div class="mx-imgBorder"]
179+
> ![](media/card-view-icon-display.png "Card view custom icon view")
180+
160181

161182
### See also
162183
[Understand model-driven app views](../model-driven-apps/create-edit-views.md)
Loading
Loading
Loading

0 commit comments

Comments
 (0)