|
| 1 | +--- |
| 2 | +title: Customize Inspection Steps |
| 3 | +description: Learn about how the steps followed in the Inspection sample apps can be customized |
| 4 | +author: sbahl10 |
| 5 | +ms.service: powerapps |
| 6 | +ms.topic: conceptual |
| 7 | +ms.custom: |
| 8 | +ms.date: 06/16/2021 |
| 9 | +ms.author: v-shrutibahl |
| 10 | +ms.reviewer: tapanm |
| 11 | +contributors: |
| 12 | +- v-ljoel |
| 13 | +--- |
| 14 | + |
| 15 | +# Inspections App – Customize inspection steps |
| 16 | + |
| 17 | +The Inspections Power Apps template allows users to create and perform inspections in the app. There are three apps, one per persona to perform, |
| 18 | +manage, and review Inspections. The three apps are – Inspections, Manage Inspections and Review Inspections. |
| 19 | + |
| 20 | +In this topic we will learn how to customize inspection steps in the user app e.g. removing the ability to add pictures to checklist steps. This is important |
| 21 | +because just deleting the particular control can cause issues with responsiveness and the look and feel of the app can get affected. |
| 22 | + |
| 23 | +>[!NOTE] Before starting this topic, please review **How to customize Inspections** (insert link). |
| 24 | +
|
| 25 | +## Prerequisites |
| 26 | + |
| 27 | +To complete this lesson, we would need the ability to login into Microsoft Teams which will be available as part of select Microsoft 365 subscriptions and will also need to have the Inspections Power Apps template for Microsoft Teams installed. This app can be installed from aka.ms/TeamsInspection. |
| 28 | + |
| 29 | +## Login into the Inspections app |
| 30 | + |
| 31 | +1. Login into Teams and right click Power Apps from the left menu and select **Pop out app**. |
| 32 | +2. Select Build from the top ribbon. |
| 33 | +3. Select the Team in which the Inspections app is installed. |
| 34 | +4. Select Inspections to open the app in the editor. |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | +5. The Inspections app opens. |
| 39 | + |
| 40 | +6. Select the tree view from the left menu. |
| 41 | + |
| 42 | +7. Select to open the Items screen. |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | +8. Press Alt and select Ambient or Backstage to open the record. |
| 47 | + |
| 48 | +9. The Food Inspection checklists page opens. |
| 49 | + |
| 50 | +10. Press Alt and select any one of the options (Detailed Walk/Morning Store Walk). |
| 51 | + |
| 52 | +11. The Inspection Overview screen appears. |
| 53 | + |
| 54 | +12. Press Alt and select the Begin Inspection button. |
| 55 | + |
| 56 | +13. The Inspection list screen opens. |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | +1. The three scenarios we will be covering in this topic are |
| 61 | + |
| 62 | + - **Hiding the Add details section completely** |
| 63 | + |
| 64 | +  |
| 65 | + |
| 66 | + - **Hiding just the Photo option** |
| 67 | + |
| 68 | +  |
| 69 | + |
| 70 | + - **Hiding the Task option** |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | +## Customizing Inspection Steps |
| 75 | + |
| 76 | +### Hiding the Add Details section completely |
| 77 | + |
| 78 | +1. Hiding the Add Details section completely is not as easy as just setting the Visible property of all those controls to False. |
| 79 | + |
| 80 | +2. First, set the Visible property for the Add details label and the other labels (Photo, Note and Task) and their icons to False. |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | +3. Thus, set the Visible property for grpNote, grpTask and grpPhoto to false – and all the options get hidden. |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | +4. Then, we will also need to shrink the white space containing the Photo, Note and Task buttons to avoid wasting any extra space – select btnActionBackground control from the tree view or just click somewhere on the white space to highlight the box space. |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | +5. Open the Height property of the control and comment the existing formula. |
| 95 | + |
| 96 | +6. Then add the following formula – btnOK.Y + btnOK.Height - Self.Y + 20. |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | +7. The white space shrinks and leaves no extra space/wastage. |
| 101 | + |
| 102 | +8. Thus, the entire Add Details section is hidden. |
| 103 | + |
| 104 | +### Hiding just the Photo Option |
| 105 | + |
| 106 | +1. For this scenario (assuming all the changes made above were undone), we will have to set the Visible property of the Photo option label and icon to false and then move the Note option and the Task Options to the left. |
| 107 | +2. To hide the Photo option, we will select grpPhoto from the tree view and set Visible = false. |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | +3. The Note option needs to move to the left in place of the Photo option – for this copy the X property of the Photo Icon and paste it in the X property of the Note icon (Notice that the label also moves along with the icon – this is because the Note label’s X property is dependent on the Note icon’s X |
| 112 | + property and changes accordingly thus leaving no empty spaces – the Task option also reacts similarly) |
| 113 | + |
| 114 | +``` |
| 115 | +btnImageBackground.X+18 |
| 116 | +``` |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | +### Hiding the Task Option Only |
| 121 | + |
| 122 | +1. For this scenario (assuming all the changes made above were undone), we only want to hide the Task section. |
| 123 | + |
| 124 | +2. Since there are no other controls dependent on the Task control it is a fairly straightforward change to make where we would change the Visible |
| 125 | + property for grpTask to false. |
| 126 | + |
| 127 | +3. This was an easy change and did not need any additional changes as hiding the Task option does not really affect anything else. |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | +### Publish the Inspection app |
| 132 | + |
| 133 | +1. All the changes to the Inspection app are completed. |
| 134 | + |
| 135 | +2. The app can now be published by selecting the Publish to Teams button on the top right. |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | +## Test the app |
| 144 | + |
| 145 | +1. On the Inspection list screen, once you make the change for any of the above listed scenarios, hit the Preview button to run the app. |
| 146 | + |
| 147 | +2. Make sure to check for responsiveness by shrinking the size of the screen when testing in the Window mode. |
0 commit comments