Welcome to Power Apps+Excel

Pic. 1

The attendance in my classes is taken by a Microsoft flow which at random moments of class hours sends to students a link to a Microsoft form. This Microsoft form has only one field to checkmark the attendance and the submit button. Since this Microsoft form was made from a blank Excel Online file, the system creates in this file a table as soon as the first attendance was marked. It inserts all other data, such as when the attendance button was pressed, when the form was submitted, as well as the full name of a student. A successful mark is confirmed by other flows to the team, to Outlook and to Kaizala. I also get this message in my second mobile phone in Kaizala. It is necessary to determine those students who in the time interval of about five minutes marked their attendance. Students can see the results in a tab of Microsoft Teams. Still, it is good to have Power app related to this table in a window of the SharePoint site of my class. Here I am going to explain how such an application can be created.

Pic. 2

Pic. 3

Pic. 4

Pic. 5

Pictures 1-5 show the steps, which are necessary to open the Power Apps Studio. I should connect the Studio with the data source. Therefore, I press the data icon shown on the left pane, see pic. 5. This action opens the window shown on pic. 6.

Pic. 6

I click any of two buttons underlined in red and get a window shown on pic. 7

Pic. 7

To get a required connector for the data flow, I click “Connectors,” see pic. 7.

Pic. 8

In the drop-down window, I select “Excel Online (Business),” see pic. 8. This choice is combined with my email address, and I see two equal connectors associated with it. I select the second, see pic. 9.

Pic. 9

Pic. 10

In the right drop-down list, I select “OneDrive for Business,” which indicates the location of my file.

Pic. 11

I chose the location of my Document Library and press the icon “OneDrive,” see pic. 11.

Pic. 12

I find my excel file in the list and select it, see pic. 12. I recommend saving all blank Excel files, which you open with Excel Online in the default location. In this case, I only changed its name, moved to the “Insert” tab of Excel and created a new form, which was automatically assigned with the file. This method is very useful to collect surveys’ responses. The application we create allows one to watch results in a nice window.

Pic. 13

Open the Excel file used as a data source. Do not remove the last column. It looks like it is a code to establish the link to the corresponding Microsoft form. It may happen that your file has several tables. To determine which suites for usage, click any cell in the table and go to the “Table Design” tab, see 1 on pic. 14. Then the name of the table is shown in box 2. In this case it is “Table1.” I check-mark it and press the “Create” button.”

Pic. 14

Add a description here.

Pic. 15

I follow the recommended settings, see pic. 15, and press the “Connect” button.

Pic. 16

My Table 1 is connected to the Power Apps Studio, as it is shown on the left “Data” pane of pic. 16. This picture corresponds to the old interface of the Power Apps Studio. To connect the data of my table, I click the “Insert” tab on pic. 17, click the “Layout” section, see 2 on pic. 17, and finally click the “Data table (preview).”

Pic. 17

It is a right moment to create a table in Power App to get these data. To do this, we search for the “Data table” icon at the top menu of the Studio. It may be present directly, or, if the window of the Studio is small, it can be opened through the check mark, see pic. 17. I press this icon and get the window shown on pic. 18. The left box marked with the data symbol is waiting the data flow, the right window repeats the “Table1” icon shown on the data pane. I press this icon and get the window shown on pic. 19.

Pic. 18

Pic. 19

The important change is shown on the “Properties” field. The “Data source” field displays “Table1.” However, I do not see any data. The reason is that I should specify the columns in Table1 which I plan to import. To do this, I click onto the “Edit fields.” It is placed below the “Data source” line. I see no data in the “Data” window, see pic. 20, but I see the “+Add field” button and press it.

Pic. 20

Pic. 21

I check-mark the boxes on pic. 21 in the order I plan to see in my application, see pic. 22. After that I press the “Add” button.

Pic. 22

Pic. 23

Picture 23 shows that the data appeared in the Data table and the “Data” pane displays the details of the chosen columns. I included the screen shot of this step applied to a table with more rows, see pic. 24. The table is imported together with the table’s heads, which are painted blue. I close the “Data” table by the mouse click on the cross symbol at the right upper corner.

Pic. 24

Pic. 25

I increase the font size from 13 to 20 and change the weight from normal to bold. I also click on the background button, see pic. 25. The results of these actions are shown on pic. 26-27. Notice, that I left some place at the top for the title pane, see pic. 25. To continue, I need to open the “Tree view” pane. To do this, I click on the icon indicated by 1 on pic. 26. It opens the required pane. Later you can click the “Three view” icon directly.

Pic. 26

Pic. 27

Pic. 28

Pic. 29

I select “Items” at the top row by the check mark. The name “Table1” of the data source appears in the function field to the right of the “f_x” symbol. I insert the code Sort(Table1,ID,Descending) instead of Table1. This code arranges all records in the table in the descending order of the row’s ID. Now, I insert a label to the top of the application screen, see pic.30. 

Pic. 30

Now, I insert a label to the top of the application screen, see pic. 30. This text label in the new interface is shown on pic. 30a

Pic. 30a

Pic. 31

Editing steps towards label creation are shown on pic. 30-31. The result is shown on pic. 32. Now, I create the refresh icon, see pic. 31 and 33. It will refresh the screen of the application to see new rows added to the table.

Pic. 32

Pic. 32a

I create the refresh icon, see pic. 33. It will refresh the screen of the application to see new rows added to the table. To find this icon, I press the "Insert" tab, see pic. 32a, open the icons' section and scroll down the list of icons arranged alphabetically until I find the "Reload" icon, see pic. 32b.

Pic. 32b

Pic. 33

This picture shows the color change of the reload icon. Keeping the “Reload” icon selected, I replace the “false” code at the command line to “Refresh(Table2),” see pic. 33a. This code activates the icon action to reload the data from Table 2 to my application.

Pic. 33a

Pic. 34

If you follow the data displayed in the time columns of the applications, you may notice that the time in the application is six hours late then in the source columns of the Excel Table. The reason for this is that the program Power Apps considers the time in the table as the time in the UTC time zone. The Almaty time is UTC+6. Therefore, it automatically adds six hours. To correct this, I select the “Start time” column, see pic. 34.

Pic. 35

The right part of the formula in the “f_x” field should be replaced with the following code:

Text(DateAdd(ThisItem.'Start time',TimeZoneOffset(ThisItem.'Start time'),Minutes))

As soon as I finished this operation, the start time becomes six hours less, see pic. 35.

Pic. 36

I repeat the same with the “Completion time” column. In this case the code looks like this, see Pic. 37:

Text(DateAdd(ThisItem.'Completion time',TimeZoneOffset(ThisItem.'Completion time'),Minutes))

Pic. 37

Pic. 38

To check how application works, I click the play button at the top menu and obtain the window shown on pic. 38.

Pic. 38a

The “Settings” icon can be reached in the new interface through the ellipsis, see 1 on pic. 38a. The play icon is shown as 2, the save button is shown as 3, the publish button is 4, and the share button is shown as 5.

Pic. 39

I open the “Settings” tab and upload an Excel logo to replace the default icon.

Pic. 40

In the Power Apps Studio, I click on the “Setting” button and scroll the upload window down until the “Data row limit” appears. The default value is 500 and the maximal possible is 2000. In the case of Excel files, I recommend fixing 2000 in this field. The reason is that it is better not to edit the Excel Table, which is controlled by a Microsoft form, as in this case.

Then I save my application through the file menu, see icon 3 on pic. 38a. The application can be published by icon 4. It must be also shared with students through icon 5.

Notice that in order it be accessible to students the initial Excel file must be shared with students in the class. The application must also be published and shared with students. Since teams of type “Class” are private, they cannot be shared in bulk as teams of type “PLC.” The application can be shared by entering students one by one. In teacher’s team, you may type the name of the team.

Pic. 41

To edit your application, you just click on the “Apps” icon and the list of all saved applications is shown. It may take some seconds until your new application appears.

I click the ellipsis shown on pic. 41, and select the required action in the drop-down window. If I click the “Details” icon, then the system opens a new window shown on pic. 42.

Pic. 42

I see the URL of my application (see the underlined line on pic. 41). It may be copied and inserted in the SharePoint site through the special Power Apps icon in the list of types of files to be inserted as a section in the SharePoint main window.