Exercise - Use the custom connector in Power Apps canvas app
You've created the connector, tested it, and now you'll learn how to use it in a canvas app.
Note
Power Apps requires either an Microsoft 365 license or a free trial. Learn more about your licensing options. Microsoft products include Microsoft Power Apps and Power Automate.
Create a canvas app
First of all, create a blank canvas app. In Power Apps studio go to the
Create
menu at the left-hand side and click theCanvas app from blank
panel.When a modal pops up, give the name, Inventory, to the
App name
field and leave the format as default. Then click theCreate
button.Navigate the
Data
menu to add the custom connector. You will see nothing in the Data pane.Click the
Add data
button and enter inventory in the search box, and you will see theInventoryManager
custom connector. (Assuming you named your custom connectorInventoryManager
.)Click the
InventoryManager
connector, and you will see theInventoryManagement
connection.Your custom connector is successfully added to your Power Apps. Navigate to the
Insert
menu at the top and clickButton
to add a button control onto the canvas.While
Button1
is selected, choose the property value to OnSelect and enter the function formula below.InventoryManagement
represents the custom connector andgetapiwarehouselocations()
represents an API endpoint. Thewarehouses
collection stores the result that thegetapiwarehouselocations()
function returns.ClearCollect(warehouses, InventoryManagement.getapiwarehouselocations())
Click
Gallery
and select theVertical
control.Once the
Vertical
control is added, it asks the data source.Select the
warehouses
collection declared above. Then theVertical
control changes below because thewarehouses
collection currently contains nothing.While holding your
Alt
key on Windows (orOption
key on Mac), click theButton
button, and you will see the list of warehouse locations showing up in theVertical
control.
You have successfully included the custom connector into your Power Apps app.