Skip to content

Commit 510e8e8

Browse files
committed
2327179
1 parent df16eca commit 510e8e8

File tree

2 files changed

+79
-82
lines changed

2 files changed

+79
-82
lines changed

powerapps-docs/maker/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2264,6 +2264,8 @@
22642264
href: ../teams/inspection-architecture.md
22652265
- name: Customize Inspection sample app
22662266
href: ../teams/customize-inspections.md
2267+
- name: Add hierarchy inspection ___location
2268+
href: ../teams/inspections-hierarchy-locations.md
22672269
- name: Issue reporting
22682270
items:
22692271
- name: Issue reporting

powerapps-docs/teams/extend-inspections-add-hierarchy-to-locations.md renamed to powerapps-docs/teams/inspections-hierarchy-locations.md

Lines changed: 77 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,149 +1,134 @@
11
---
2-
title: Add hierarchy to ___location of Inspection
3-
description: Learn about how the Inspection sample apps can be extended to add ___location of inspection
2+
title: Add hierarchy to inspection ___location
3+
description: Learn about how to add hierarchy to inspection locations in Inspections sample app.
44
author: sbahl10
55
ms.service: powerapps
66
ms.topic: conceptual
77
ms.custom:
8-
ms.date: 06/15/2021
8+
ms.date: 07/12/2021
99
ms.author: v-shrutibahl
1010
ms.reviewer: tapanm
1111
contributors:
12-
- v-ljoel
12+
- joel-lindstrom
13+
- navjotm
14+
- tapanm-msft
15+
- sbahl10
1316
---
1417

15-
# Inspections App – Add hierarchy to ___location of inspection
18+
# Add hierarchy to inspection ___location
1619

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.
20+
The Inspections sample app allows users to create and perform inspections in the app. There are three apps, one per persona to perform, manage, and review Inspections. The three apps are—Inspections, Manage Inspections and Review Inspections.
1921

20-
By default the Inspection app is designed for a single store. But what if you perform inspections on multiple stores? You will want to add a table for stores to the app and let the user select the store in which they are performing inspections so that you can track at which store the inspection was performed.
22+
By default, the Inspections app is designed for a single store. But what if you perform inspections on multiple stores? You'll want to add a table for stores to the app and let the user select the store in which they are performing inspections so that you can track at which store the inspection was performed.
2123

22-
In this topic we will learn how to update the app to add a hierarchy of stores so that inspections can be performed for different stores.
24+
In this article, we'll learn how to update the app to add a hierarchy of stores so that inspections can be performed for different stores.
2325

2426
## Prerequisites
2527

26-
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+
To complete this lesson, we'd 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 sample app for Teams installed. This app can be installed from <https://aka.ms/TeamsInspection>.
2729

2830
## Edit the Inspections app
2931

30-
1. Login into Teams and right click Power Apps from the left menu and select **Pop out app**.
31-
32-
2. Select Build from the top ribbon.
32+
1. Login into Teams, and right-click on Power Apps app from the left-pane, and select **Pop out app**.
3333

34-
3. Select the Team in which the Inspections app is installed.
34+
1. Select **Build** from the top ribbon.
3535

36-
4. Select Inspections to open the app in the editor.
36+
1. Select the team in which the Inspections app is installed.
3737

38-
5. The Inspections app opens.
38+
1. Select Inspections to open the app in Power Apps Studio.
3939

4040
### Add a new table called Store
4141

42-
1. Select **Data** from the left navigation menu.
42+
1. Select **Data** from the left-pane.
4343

44-
2. Select **+Add data**.
44+
1. Select **+ Add data**.
4545

46-
3. Select the **+Create new table**.
46+
1. Select the **+ Create new table**.
4747

48-
4. Enter table name Store and select **Create**.
48+
1. Enter table name Store and select **Create**.
4949

50-
5. Select the **Add Column** button to add a new column.
50+
1. Select the **Add Column** button to add a new column.
5151

52-
6. Enter column name = Store Number and select **Create** – the column gets added.
52+
1. Enter column name as "Store Number", and select **Create**.
5353

54-
7. Add a few records of data in the table and select **Close.**
54+
1. Add a few sample records in the table, and select **Close.**
5555

56-
![Store Table](media/extend-inspections-add-hierarchy-to-locations/store-table.png "Store Table")
56+
![Store Table](media/extend-inspections-add-hierarchy-to-locations/store-table.png "Store Table")
5757

5858
### Add a column to capture Store in the Area Inspections table
5959

60-
1. Select **Data** from the left navigation menu.
60+
1. Select **Data** from the left navigation menu.
6161

62-
2. Locate the Area Inspections table and hit on the three dots.
62+
1. Locate the **Area Inspections** table and hit on the three dots.
6363

64-
3. Select **Edit Data**.
64+
1. Select **Edit data**.
6565

66-
4. The Area Inspections table opens.
66+
1. Select **Add Column**, and enter the table name as "Store", type as "Lookup", and related table as "Store".
6767

68-
5. Select **Add Column**, enter the Table name = Store, Type = Lookup, Related Table = Store.
69-
70-
6. Select **Create**.
68+
1. Select **Create**.
7169

72-
7. The column gets added.
73-
74-
8. Select the **Close** button to close the table.
70+
1. Select **Close**.
7571

7672
### Add a new screen with a Gallery of Stores
7773

78-
1. Select the Tree view from the left navigation menu.
79-
80-
2. Select **+New** screen from the tree view.
81-
82-
3. Select Blank layout.
83-
84-
4. The new screen gets added.
74+
1. Select the Tree view from the left-pane.
8575

86-
5. Rename the screen to **StoreSelectionScreen**.
76+
1. Select **+ New** screen from the tree view.
8777

88-
6. Update the Fill property to **gblAppStyles.Background.Fill**.
78+
1. Select blank layout.
8979

90-
7. Select the **+Insert** button to add a Gallery to the new screen.
80+
1. Rename the screen to "StoreSelectionScreen".
9181

92-
8. Select Stores as the data source.
82+
1. Update the **Fill** property to `gblAppStyles.Background.Fill`.
9383

94-
9. Gallery gets added to the new screen.
84+
1. Select **+ Insert** to add a gallery to the new screen.
9585

96-
10. Rename the gallery to **StoresGallery**.
86+
1. Select **Stores** as the data source.
9787

98-
11. Update Template Size to **108**.
88+
1. Rename the gallery to "StoresGallery".
9989

100-
12. Update FontSize of Label Title4 to **20**.
90+
1. Set the following properties for the gallery **StoresGallery**.
10191

102-
13. Set Height of Label Title4 to **45**.
92+
| Property | Value |
93+
| - | - |
94+
| Template size | 108 |
95+
| Font size | 20 |
96+
| Height for Title4 | 45 |
97+
| Font size for label Subtitle4 | 18 |
98+
| Height for label Subtitle4 | 45 |
10399

104-
14. Update FontSize of Label Subtitle4 to **18**.
100+
1. Go to the **Items** screen, and copy the **Back** button from the top of the screen.
105101

106-
15. Set Height of Label Subtitle4 to **45**.
102+
1. Paste the copied button on the new screen.
107103

108-
16. Navigate to Items screen and copy the Back button from the top of the screen.
104+
1. Repeat the previous steps to copy the label **lblIndividualAreasHeader** from Items screen that reads the text as ___location to the new screen.
109105

110-
17. Go back to the New screen and paste the Back button copied in the previous step.
106+
1. Set **Y** property of the label to `btnBackToHome_1.Y+btnBackToHome_1.Height`.
111107

112-
18. Now, navigate again to the Items screen and copy the label lblIndividualAreasHeader that reads the text as Location.
108+
1. Set the following properties of the gallery **StoresGallery**.
113109

114-
19. Go back to the New screen and paste the label copied in the previous step.
110+
| Property | Value |
111+
| - | - |
112+
| Y | `btnBackToHome_1.Height+lblIndividualAreasHeader_1.Height` |
113+
| Height `Parent.Height-btnBackToHome_1.Height- lblIndividualAreasHeader_1.Height` |
114+
| OnSelect | `Set(gblSelectedStore,ThisItem);Navigate('Items Screen')` |
115115

116-
20. Set the following properties of the label
117-
- Y = **btnBackToHome\_1.Y+btnBackToHome_1.Height**
118-
119-
21. Set the following properties of the gallery StoresGallery
116+
1. Go to the Items, select the **Back to home** button on top, and update the following button properties.
120117

121-
- Y = **btnBackToHome\_1.Height+lblIndividualAreasHeader_1.Height**
118+
| Property | Value |
119+
| - | - |
120+
| OnSelect | `Navigate(StoreSelectionScreen, ScreenTransition.Fade)` |
121+
| Text | `"Back to Store Selection"` |
122122

123-
- Height = **Parent.Height-btnBackToHome\_1.Height- lblIndividualAreasHeader_1.Height**
124-
125-
- OnSelect = **Set(gblSelectedStore,ThisItem);Navigate('Items Screen')**
126-
127-
22. Navigate to the Items Screen and select the **Back to home** button on top.
123+
1. Go to **Checklist Steps** screen.
128124

129-
23. Update the following properties of that button
125+
1. Select the **OnSelect** property of the screen, and update the patch function for updating the **Area Inspections** app to add the store value in the formula.
130126

131-
- OnSelect = **Navigate(StoreSelectionScreen, ScreenTransition.Fade)**
132-
133-
- Text = **"Back to Store Selection"**
134-
135-
24. Navigate to Checklist Steps Screen.
136-
137-
25. Select the OnSelect property of the screen.
138-
139-
26. Update the Patch function for updating the Area Inspections app to add the Store value in the formula –
140-
141-
```
127+
```powerapps-dot
142128
, Store: gblSelectedStore
143129
```
144130
145-
146-
![Add Store to the Patch function](media/extend-inspections-add-hierarchy-to-locations/add-store-to-patch.png "Add Store to the Patch function")
131+
![Add Store to the Patch function](media/extend-inspections-add-hierarchy-to-locations/add-store-to-patch.png "Add Store to the Patch function")
147132
148133
### Update the Welcome Screen navigation
149134
@@ -167,7 +152,7 @@ To complete this lesson, we would need the ability to login into Microsoft Teams
167152
168153
### Publish the Inspections app
169154
170-
1. All the changes to the Inspection app are completed.
155+
1. All the changes to the Inspections app are completed.
171156
172157
2. The app can now be published by selecting the Publish to Teams button on the top right.
173158
@@ -341,7 +326,7 @@ Days
341326
342327
## Test the app
343328
344-
1. Open the Inspection App in the team in which it is installed.
329+
1. Open the Inspections app in the team in which it is installed.
345330
346331
2. The app loads.
347332
@@ -380,3 +365,13 @@ Days
380365
19. The screen displays the Store name before the Submitted by as shown in the screenshot below.
381366
382367
![Store showing on Location screen](media/extend-inspections-add-hierarchy-to-locations/test-result-store-on-___location-screen.png "Store showing on Location screen")
368+
369+
### See also
370+
371+
- [Understand Inspection sample apps architecture](inspection-architecture.md)
372+
- [Customize Inspection sample app](customize-inspections.md)
373+
- [Customize sample apps](customize-sample-apps.md)
374+
- [Sample apps FAQs](sample-apps-faqs.md)
375+
- [Use sample apps from the Teams store](use-sample-apps-from-teams-store.md)
376+
377+
[!INCLUDE[footer-include](../includes/footer-banner.md)]

0 commit comments

Comments
 (0)