Canvas Apps Functions


The post contains screenshots I took when going through some Microsoft tutorials. There functions covered are:

Search, SortByColumns, Distinct, Filter, Lookup, Sequence & Collect


The input data

The ‘Schedule’ table (Figure 1) represents the data used in the examples below.

Figure 1


Clicking on ‘BrowseGallery2’ displays ‘Schedule’ in the formula window (Figure 2). This simply means all records from the Schedule table will be displayed

Figure 2

To provide a more specific view of the data in the gallery, the ‘Search’ function is added. It can be added by simply typing in the function name or by selecting it (Figure 3)

Figure 3

The formula is added (Figure 4 & 5)

Figure 4
Figure 5

A preview of the app (Figure 6). The string from TextSearchBox2.Text is used to search the columns ‘Volunteer’ & ‘StartDay’ of the data source spreadsheet (Figure 1). If there is no string in the Text box, then all 6 records from the spreadsheet are displayed

Figure 6


Adding to the existing formula by adding the function SortByColumns. It will sort on the ‘Volunteer’ column

Figure 7
Figure 8

A preview of the app (Figure 9)

Figure 9

Press the sort icon

Figure 10


A combo box is added to the form (Figure 11) which will be included in the Search formula (Figure 13)

Figure 11

A preview of the app. The combo box displays the Volunteers

Figure 12


Adding the Filter function and the combo box to the Search formula

Figure 13

A preview of the app

Figure 14


The lookup function is applied to a label. It will display the first record which returns true

Figure 15

A preview of the app

Figure 16


The ‘sequence’ function is added to the gallery (it works with other controls too).

Figure 17

Selecting ‘Sequence’ and then the arrow icon displays the preview pane

Figure 18

A preview of the app

Figure 19


Clicking on the button creates/updates myCollection with a record containing two columns

Figure 20

Double clicking on myCollection in the formula window brings up the collection preview pane. The button has been pressed twice, so two records appear

Figure 21

Since the resulting myCollection is in the form of a table, it can be set as the data source for the gallery BrowseGallery2

Figure 22

Figure 23