You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: powerapps-docs/maker/common-data-service/display-custom-icons-instead.md
+30-9Lines changed: 30 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "Display custom icons alongside values in list views with PowerApps | MicrosoftDocs"
3
3
description: "Learn how to display custom icon graphics in a view"
4
4
ms.custom: ""
5
-
ms.date: 02/14/2019
5
+
ms.date: 11/20/2019
6
6
ms.reviewer: ""
7
7
ms.service: powerapps
8
8
ms.suite: ""
@@ -29,23 +29,24 @@ search.app:
29
29
30
30
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.
31
31
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
+
32
34
> [!div class="mx-imgBorder"]
33
35
> 
34
36
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.
37
38
38
-
###Add custom graphics and JavaScript as web resources
39
+
## Add custom graphics and JavaScript as web resources
39
40
40
41
1. Create the new graphic files needed for your customization. We recommend an icon size of 16x16 pixels (larger images will be scaled down).
41
42
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.
43
44
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).
45
46
46
47
4. The **Default Solution** pop-up window opens. Navigate to **Components** > **Web Resources** here.
47
48
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:
49
50
50
51
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.
51
52
@@ -89,7 +90,7 @@ search.app:
89
90
90
91
14. Repeat these steps for each entity, view, and column as needed.
91
92
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.
93
94
94
95
<aname="SampleJavascript"></a>
95
96
@@ -156,7 +157,27 @@ function displayIconTooltip(rowData, userLCID) {
156
157
157
158
<!-- 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:
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
+
> 
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
+
> 
174
+
175
+
### Card forms
176
+
Custom icons replace the default system-generated icon when the view is configured to use a card form.
0 commit comments