Power Apps Training FAQ (For Power Virtual Agents)

Table of Contents:

 

Where can I find Hands-on Labs?

For Power Apps we have: App in a Day. If you prefer a video of this you can find it here: App in a Day -Virtual edition. For Power Automate you there is Flow in a Day. For Power Administrators we have PowerApps Admin in a Day lab. If you wanted to integrate AI there is AI Builder In a Day, Object Detection with AI Builder, AI Builder Forms Processing. Additionally we have App in an hour and App in two hours. In the process in we have Integrating Application Insights with Power Apps (NEW) and Power Platform Tour in a Day (NEW /Rough Draft)

 

Where can I find Step-by-Step Guides?

You can find step by step guides here:

Where can I find Videos?

 

 

Where can I find Samples?

Microsoft Learning Paths?

In addition to the amazing community content, Microsoft has also created a set of learning paths to help you get up to speed with PowerApps and the rest of the Power Platform.  You can see the entire list of PowerApps learning content here and included below:

Creating a send-smile-component for Power Apps using Power BI and Application Insights

In process and still a draft…will remove this line when finished!

Early February we released an exciting new feature that enables you to add telemetry logging to your application using Application Insights.

That blog post can be found here:

https://powerapps.microsoft.com/en-us/blog/log-telemetry-for-your-apps-using-azure-application-insights/

This blog post is a walk through for getting that running specifically for creating a send a smile experience from your Power Apps.

You can also find a video of this walk through here: https://youtu.be/Kv8TOOeyj48

The walk through steps:

  1. Log into your Azure Subscription.

    While this walk through requires an Azure subscription, that subscription does not have to be in the same directory in your Power Apps tenant

  1. Create an Application Insights resource

  1. Name your resource instance. If you don’t already have a resource group you can create one.

  1. Create the resource Instance

  1. Copy the instrumentation Key

3. Create a new Power Apps application

4. Set the Instrumentation key

4. Navigate to Components

  1. Create a new component

  1. Resize the component screen

  1. Add a smile and frown Icon to the component.

  1. Select the frown icons and add the following code:

    Trace(“SendASmile”, TraceSeverity.Information,{ChucksappName : “Blog App”, Satvalue: “-1“, AppUser: User().FullName })

  1. Select the smiley face and insert the following code in on the OnSelect event

Trace(“SendASmile”, TraceSeverity.Information,{ChucksappName : “Blog App”, Satvalue: “1“, AppUser: User().FullName })

  1. Rename the component. You can do this by double clicking or right clicking on the component name > Rename

  1. Navigate back to Screens

  1. Navigate to Custom and insert our component SendASmile

  1. Go to file Save and Save your application.

  1. To find the play URL. Navigate to File > Settings and select Edit App Name

  1. Navigate to the Web Link. This is required as the telemetry is only collected in “play” mode rather than design mode.

  1. Run the application and click on your icons a couple of times

  1. Navigate back tot the Azure Portal and Application Insights.

In Application Insights choose the application you create

  1. In about 5 minutes you should be able to see your telemetry start coming through.

Exporting your Application Insights resource data to Power BI

Now that you have your Power Apps application connected to Application Insights you can configure Power BI to automatically import log data from Azure Monitor to take advantage of these additional visualizations.

  1. In your query window remove the limit line so the entire query is simply “traces”. Select Export > Export to Power BI. This will export the M Query that you can use in Power BI desktop.

  1. Open Power BI Desktop. Select Get Data > Blank Query > Connect

  1. In the Power Query Editor, select the Advanced Editor option. In the advanced editor erase the default query and paste in the query downloaded from the Export step above.

  1. Here is an image of this in a completed state. Select “Done”


  1. Transform the customDimensions column to JSON


  1. Select the customDeminsions column and select the columns you are interested. Note: you will almost certainly need to click “Load More” to see all the values.


  1. Select the customDeminsions column and select the columns you are intereste in.


  1. Remove Errors. As we expanded a column that doesn’t have all the values there will be errors in the dataset. If you do not do this you will get the error:

Failed to save modifications to the server. Error returned: ‘OLE DB or ODBC error: [Expression.Error] The parameter is expected to be of type Text.Type or Binary.Type.. ‘

  1. Change the data type of our SatValuue to whole number. Note: In later releases you will be able to pass in numbers from Power Apps and this step won’t be needed.


  1. Select Close and Apply. Note if you get errors from other columns you can either ignore them remove them by repeating the remove error step as shown above for the other columns.

  1. You can now work with this dataset as any other Power BI Dataset….In this case a card is displaying the average Satvalue. Note since this dynamically retrieving data from Application Insights you would likely want to use a DataFlow to persist the data over time.

App in a Day + AI Builder, Portal and Virtual Agents

Application Introduction: End to end employee hardware ordering solution  

This solution simulates how a large organization might supply their employee’s hardware needs. This offering consists of a secure application that enables comparing and ordering company confidential configurations and pricing and can run on mobile devices yet offers support that takes advantage of global/public facing locations and knowledge bases.

The business requirements for the application are:

 

  1. Securely displays only organization IT approved devices and prices
  2. Runs on both web and mobile devices
  3. Friction free and intuitive device identification
  4. Streamlined order and approval process
  5. Self Service and serviced hardware support options that leverage AI and global support learning
  6. Built by the internal IT group who does not have traditional development resources

 

Technologies utilized to achieve the business requirements.

  1. Common Data Service (CDS): Make it easier to bring your data together and quickly create powerful apps using a compliant and scalable data service and app platform that’s integrated into PowerApps.
  2. PowerApps: A software as a service application platform that enables power users in line of business roles to easily build and deploy custom business apps. You will learn how to build both Canvas and Model-driven style of apps.
  3. AI Builder Object Detection: To enable easier identification and to find specific device AI Builder will enable uploading an image or photo of a specific device.
  4. Power Virtual Agents bots: To offer a self-serviced support offering that leverages the entire customer installed base learning a Power Virtual Agents bot will be offered that can offer fixes, updates and replacement options at the closest stores.
  5. PowerApps Portal: low-code, responsive websites which allow external users to interact with the data stored in the Common Data Service. While the ordering application must be internal facing due to confidential pricing and configurations the support Portal will leverage global public facing support options and knowledgebases

Exercises

 

  1. Create a new environment with a common Data Service Database.
    1. Use the solution to create the entity, bring in components and enable “take home” options for students
    2. Start the Portals provisioning
    3. Start the Power Virtual Agents provisioning
    4. Import Data from web-based data source and creating entities into Common Data Service
  2. Create a Power Apps canvas-based application with components
  3. Use AI Builder to enhance the existing paper-based system.
  4. Use Power Automate to request a device via approvals
  5. Create a Power Virtual Agents support bot
  6. Create a Power Apps Portals to host the support bot

Optional:

  1. Integrate Power BI Tiles to show store location

Pre-requisites: Before starting the hands-on lab

Task 1: Download the Power Apps Solution file


https://aka.ms/AIADSolution

 

Setting up the environment and data

This application will be created in a dedicated environment that enables architectural, security and organization separation and geographic specificity.

 

  1. Navigate To PowerApps.com and log in with an account and Password supplied by the instructor.

    The lab directions assume accounts supplied by the instructor. You can use your own accounts but forewarning these labs require permissions to create Common Data Service databases, will be starting trials that will start their expiration countdown and creating Portals that do have external visibility, so it is not recommended. If you are not in a formal class you may provision a free Office365 demo tenant at http://aka.ms/Office365E5Trial and use the demo tenant credentials to sign up for a Power Apps Trial

     

  1. Click on the gear in the upper right corner and navigate to the Power platform Admin Center

 

  1. Create a new environment with a Common Data Service database (no need to change any other of the defaults)


 

  1. After provisioning is complete navigate back to PowerApps.com (likely the first tab in your browser) to this new environment.

  1. Adding the App in a Day Solution.

    To enable moving your application across environments, using components and custom entities created earlier, this lab leverages a solution you can find here: https://aka.ms/AIADSolution

  1. Import the App in a day Solution.

    Navigate to https://aka.ms/AIADSolution and download this file to your hard drive then select Import in the Solution home to bring this solution into your Power Apps environment.

 

  1. Publish customizations to push the Device Order custom entity definition into this environment.

  1. Brining in the Application Data

    These steps will create new entities in Common Data Service with the standard configuration information.

    Navigate to the Data panel, select Entities and choose Get Data. (note: you can see the Device Order entity underlined in orange that was brought in with the solution).

  1. Select the Text/CSV data source

 

  1. Reference the Manufactures data source: https://aka.ms/Manufactures.CSV

  1. Name the entity Manufactures and select next

  1. Load this data into a new entity, set the data type of the ManufactureName from Multiline text to Text and set the primary field mapping key field ManufactureName

  1. Create the Manufactures entity with manual refresh.

  1. Repeating the same steps above for the Devices entity:     

  1. Select the Text/CSV data source

  1. Reference the Devices data source: https://aka.ms/Devices.CSV

  1. Names the Devices entity

  1. Load the devices data into a new entity, set the data type and field mapping for the primary key.

  1. Create the Devices entity with manual refresh.

(note this will take a couple of minutes)

  1. Navigate to the solutions view and open the Device Order Solution

  1. Add those new entities to the Solution

Congratulations badge: “Importing Common Data Service data”
achieved!!!!!!!!!!

 

  1. Start the Portal creation process.

    Portals will take 30 minutes to provision. As this runs asynchronously the lab will get this started now so it is completed when needed.

  1. Supply Portal creation information. Please keep in mind these sites default to anonymous access and are publicly visible.

CREATE BOT HERE TOO!!!!!!!!!!!!!!!!!!!!!!!

https://Aka.ms/trypva

Congratulations you are now ready to start making some applications!!

 

Building the Device Ordering Power Apps Canvas App

IMPORTANT:
Do not proceed before going through the lab pre-requisite steps

This lab will create new Device ordering application to replace an existing paper and email-based system.

Power Apps Canvas Studio Layout

Power Apps Canvas Studio is available as a web application (http://make.powerapps.com) that you can use in any modern browser.

Power Apps Studio is designed to have a user interface familiar to users of the Office suite. It has three panes and a ribbon that make app creation feel like building a slide deck in PowerPoint. Formulas are entered within a function bar that is like Excel. Studio components:

  1. Left navigation bar, which shows all the screens, data sources, and controls in your app
  2. Middle pane, which contains the app screen you are working on
  3. Right-hand pane, where you configure properties for controls, bind to data, create rules, and set additional advanced settings
  4. Property drop-down list, where you select the property for the selected control that you want to configure
  5. Formula bar, where you add formulas (like in Excel) that define the behavior of a selected control
  6. Ribbon, where you perform common actions including customizing design elements
  7. Additional items, here you will find your environment selection, app checker, and the preview app functionality.


Goals for this lab

 

 


After this lesson you will be able to:

  1. Create a Canvas App
  2. Add screen to your app
  3. Use formulas in your app
  4. Navigate between screens
  5. Customize galleries on your screens
  6. Capture a collection from your app

 

 

 

The time to complete this lab is [60] minutes.

 

When you are done with this first portion of the lab, your app will look like this:

 

 

Locale-specific difference in formulas

 

Before you begin, please note that if your computer has its regional settings set to use the comma ‘,’ for its decimal separator (like in much of Europe) your formulas will need to use a semicolon ‘;’ instead of a comma in your formulas. For example:

En-US

Filter(Machines, OEMsGallery.Selected.MFR=MFR)

de-DE

Filter(Machines; OEMsGallery.Selected.MFR=MFR)

 

These localized formats are indicated with the symbol throughout the document. If you are in the en-us locale, you can ignore any of the formulas indicated by the locale symbol.

 

Exercise 1: Create the app in Power Apps

Before creating an app, ensure you are in the new environment that you created above. Click the Environment drop-down in the top right of the screen to switch to the new environment. (If your environment doesn’t show up, try logging out and logging in again)

  1. Navigate to the solutions view and open the Device Order Solution

  1. Add a new App of type Canvas with a Tablet form factor

  1. Rename the screen

In this task, you will rename Screen1 to MainScreen

  1. Select the screen by clicking the Screen1 tile in the Tree view.
  2. Click “…” next to Screen1 (or right click Screen1) and select the Rename option.

     

  1. Change the name to MainScreen.

Note: You can also rename the screen by clicking on the screen name in the right pane and selected the edit icon, or double clicking on it.

Tip: It is a good practice to rename screens and controls as you create them, so they are easier to locate as you work with formulas that reference different controls. In this lab, you will be prompted to rename screens and some of the controls. For the others, you may rename them as you please on your own.

 

Using Components

In this section you add a component to act as your header containing the app name and logged in user’s name

  1. In the tree view select “Components” under the ellipses select “Import Components”. If you don’t see the components you may need to exit and re-log in.

  1. Select the App titled “Device Ordering App Component”

  1. Here is the view of the component

 

  1. Navigate back to the MainScreen, select the custom menu and add the Header component.

    You will want to resize the component to the width of your screen.

    Are you ahead of schedule?

    Bonus: Build your own component that enables you to set the font color and have responsive sizing!

 

In the application settings page, you can:

  1. Change your app name
  2. Customize the app icon – choose a background color and icon
    1. Save your application “Device Ordering”

 

  1. Under settings, Select the Screen Size + Orientation tab to view the available screen orientation and aspect ratio settings. For this app, we will leave it at the default setting of Landscape with 16:9 aspect ratio.

  1. Click Save in the left navigation.
  2. Select The Cloud and click Save.

  1. After the app is saved, click the Back arrow in the top left to get back to the studio.

 

Tip: In Power Apps when you save a version of your app the first version is published by default and available to everyone you share the app with. Subsequent saves are only visible to the app maker in the studio. You must explicitly publish it for all app users to get the update. For more details on saving, publishing and sharing apps, see:

https://powerapps.microsoft.com/tutorials/save-publish-app/

https://powerapps.microsoft.com/tutorials/share-app/.

https://powerapps.microsoft.com/blog/saveandpublish/.

Exercise 2: Add Device Gallery and Connect to Data Source

In this exercise, you will add a gallery of all available devices making it easy for users to browse the list and get a quick overview of the devices available.

Task 1: Add device gallery

  1. With MainScreen selected, select the Insert tab.
  2. Click Gallery and select Horizontal.

This will add a gallery called Gallery1 onto the screen. Notice the control tree view on the left displays this gallery with three controls within it – two labels and an image. A data pane will pop up on the right.

  1. Under search or the drop down select the “Manufactures” entity.

 

  1. Select Gallery1 and notice the Items property is set to Devices. Notice the gallery is populated with data.

  1. Rename the Gallery1 to DeviceGallery.

 

Tips on working with galleries:

Galleries provide a powerful way to visualize tabular data in Power Apps. It is important to become familiar with customizing a gallery. Key components of a gallery: the gallery control, the template cell (first cell), and controls within the template cell.

To select the entire gallery – click on the gallery in the tree view on the left or click on the second or third cell. Clicking any cell that is not the first cell of the gallery will select the entire gallery. Now you can specify properties that apply to the entire gallery, such as the Items property, which is the data source, the gallery fill color, borders, etc.

To customize how each item is displayed in the gallery, you will customize the template cell. Select the template by clicking in the first cell of the gallery or click on the pencil icon in the top left corner when the entire gallery is selected.

You can now add, remove and customize the controls within the template cell. These changes will then repeat across each item or row in the table.

Go ahead and select the device image in the template cell and change its size. Notice how the size of the image changes in all the cells.

You can also test your gallery right on the canvas by holding down the Alt key to activate.

You will customize the device gallery in subsequent steps.

Don’t worry about making the gallery pixel perfect, the purpose of this exercise is to get your app working with a good enough UX. You can always repeat these labs to practice your pixel perfect skills.

 

Task 2: Arrange the device gallery

  1. Resize and reposition the gallery. You can drag and drop the gallery or use the gallery properties pane on the right.

  1. Select the DeviceGallery and click the Edit (pencil) icon in the top left to edit the template cell.

  1. Using the right drag control, resize the first box to be narrower. Notice that all the items get narrower and more devices are visible on the screen.

  1. Narrow the image as well by clicking on the image control and resizing it using the drag handles. Make sure the width of the image control is positioned within the template.

  1. Notice the gallery control on our screen automatically has scrolling capabilities.

 

Task 3: Add gallery to show manufacturers

In this task, you will add a second gallery that will list the various device manufacturers. This will be a single column vertical gallery down the left side of the screen, with each cell displaying the manufacturer’s logo image. This gallery will later be used as a filter for the device gallery created above.

  1. Select the MainScreen.
  2. Select the Insert tab on the ribbon and open the Gallery drop-down, then select Vertical.

  1. Select Manufacturers for the data source.
  2. Rename the gallery to ManufacturerGallery.

  1. Move this new gallery so that it is left aligned with the left edge of the screen and top aligned with the top of the device gallery. Your two galleries should like the image below.

  1. Select ManufacturerGallery (not just the template cell), in the Properties tab on the right, click Layout.

  1. Scroll down to the Gallery section and select 2 Columns.

  1. Change the Wrap Count from 2 to 1. This will change it to a single column gallery.

  1. Select the image control within the gallery (the Edit Pencil icon) and reduce its height by dragging the middle bottom drag control upwards. The image size will reduce whereas the template size will still be expanded.

  1. Reduce the height of the template cell to match the image below. We essentially want the image to occupy the entire cell.

  1. Click File and Save the application.
  2. Click on the Back arrow.

     

Task 4: Connect ManufacturerGallery to manufacturers table

Earlier you connected the data source using the Data tab in the right pane. You can also connect to data via the formula bar.

  1. Select the ManufacturerGallery. Make sure the whole gallery is selected and not just the first cell.
  2. Select Items from the property drop-down next to the formula bar. Notice that the gallery is populated with images of buildings. This is because Power Apps picked a default binding which mapped to the HQ column in the table.

  1. Select the image control in the first template cell in the gallery and change the value of Image in the formula bar from ThisItem.HQ to ThisItem.Logo. All the gallery items will now display logo images. You can also use the left tree view to select the controls, sometimes that is easier!

Note: Autosuggest offers you valid options for authoring formulas. See in the image below, we want to define the image to display from our data. Once we type ThisItem our Autosuggest tells us that we have three valid options for this formula. This can help guide you to making valid formulas.

  1. Select the first (top-most) image and using the Properties pane on the right, set the Image position property to Fit.

  1. Reduce the height of the template cell such that all nine manufacturers fit without a scrollbar. To do this, use the drag handles to first reduce the height of the image and subsequently reduce the height of the template cell.

    Note again that to select the template cell, select the entire gallery and click on the pencil icon in the top left.

 

Task 5: Highlight the selected item in the gallery

In this task, you will use the TemplateFill property of the manufacturer gallery to specify a highlight color for the selected item

  1. With the ManufacturerGallery selected, set the TemplateFill property on the gallery to the following formula to conditionally set the fill color of the selected cell to light blue:

    If(ThisItem.IsSelected,LightBlue)

     

    Alternately, you could set the TemplateFill property to:

    If(ThisItem.IsSelected,ColorFade(HeaderLabel.Fill,75%))

    This approach is recommended so the fill color matches the header label with a 75% fade. If you change the fill color of header label, the fill color of the selected item in the gallery will automatically change.


 

  1. Now try using the preview mode to perform a quick test of this highlighting. You can enable preview mode by holding down the Alt key (also known as the Option key) and clicking a few different manufacturers in the gallery, notice the selected item in the manufacturer gallery is highlighted in a light blue color. The preview mode ends when you stop holding the key.

    Alternatively, you could click the Play () button to enter preview mode, and to exit this you would hit the X in the upper right corner or use the Esc key.

 

Task 6: Filter the devices based on selected manufacturer

In this task, you will use the Filter() function to filter the items in the DeviceGallery to only display devices that match the selected item in the ManufacturerGallery.

Select the DeviceGallery. With the Items property selected, enter the following expression in the formula bar:

Filter(Devices,ManufacturerName= ‘Manufacturer Gallery’.Selected.ManufacturerName)

  •  

    for alternate/European locales:

Filter(Devices;ManufacturerName= ‘Manufacturer Gallery’.Selected.ManufacturerName)

 

This will filter the device gallery to only display items that match the selected manufacturer based on ManufacturerName

  • Select a different item in the manufacturer gallery on the left, and you will notice the device gallery will update accordingly. Note: In some cases, the first few items won’t show the selection, try selecting the 5th or 6th item if that occurs.

Note: If you get an error when entering the Filter command, check the name of the manufacturer gallery. The name in the filter command must match the name of your gallery.

More details on the Filter() function is available at https://powerapps.microsoft.com/tutorials/function-filter-lookup/.

A complete set of expressions is available at https://powerapps.microsoft.com/tutorials/formula-reference/.

 

Task 7: Configure text labels in the device gallery

  1. Select the subtitle in the DeviceGallery. It is named Subtitle1 in the tree view. It may have the default value set to the DeviceType property (e.g. Tablet).
  2. Change the label to display the device name by setting the label’s Text property to: ThisItem.Price

Here are some additional formatting suggestions. These are for cosmetic purposes only, feel free to skip past these:

  1. Expand the width of the label to the template width.

    Notice that the second label expands as well. This is because it is X property is set to Title1.X, the X coordinate position of the Title1 label. For more on the relative positioning of controls, see https://powerapps.microsoft.com/blog/ux-patterns-control-positioning/

  2. Change the PaddingLeft
    from
    0 to 10.
  3. Change the font to Segoe UI.
  4. Select the Title1.
  5. In the property drop-down list, select the Text field and change to ThisItem.Title.

  1. To add the $, use the text format expression: Text(ThisItem.Price,”$##,###.00″) or for alternate/European Text(Price;“$##.###,00”)

    locales:

    Note: After you enter the above value in the formula bar, it will automatically resolve to include your locale, e.g. [$-en-US]. If you see an error here, it might be because your locale is not yet supported, in which case as a workaround, manually change it to [$-en-US]:

Optional UI enhancement:

  1. Like above, change the value of the PaddingLeft property of the Title1 label from 0 to 10. Or set it to Title1.PaddingLeft.
  2. Change font to Segoe UI.

 

 

Task 8: Conditional formation to highlight devices above $1,000

We can make it easy to spot devices that cost more than $1,000, by displaying the price in Red.

  1. Select the label in the template cell that displays the price and set the Color to If(Price>1000,OrangeRed,Gray) or for alternate/European locales: If(Price>1000;OrangeRed;Gray)

Note: As you are typing this formula notice that the autosuggest shows a choice of matching colors. Power Apps comes with a set of standard colors that you can easily reference in any property that accepts a color value. You can also set specific RGB values.

For a full list of Color functions and colors, see https://powerapps.microsoft.com/tutorials/function-colors/

  1. Click File and select Save.
  2. Click the back arrow.

 

Task 9: Add an order to Device Order Common Data entity using a form

  1. Click on Insert > Forms and select Edit

  1. Resize the edit form to the bottom of the application.

  1. Set the Data Source of the form to the “Device Orders” entity

  1. Remove the field “Created On”

  1. Add the fields to Name, Price, Request by, Requested Date

  1. Set the form to have two columns

  1. To set the properties of the name edit form; select the Name text box and the Advanced properties. Select “Unlock to change properties”

  1. Scroll down to Default property and type:


‘Device Gallery’.Selected.’Device Name’

  1. Unlock the “Requested By” property

  1. Set the “Requested By” property to

    User().Email


 

  1. Unlock the “Price” property

  1. Set the “Price” default property to:

Text(‘Device Gallery’.Selected.Price,“$.00”)

 

  1. Rename our edit form from Form1 to “OrderForm”

 

  1. Add an Icon for our save. Click on Icons menu and select “Check” and move to the bottom right of the screen as indicated below.

  1. To write the order details to the CDS entity: Select the Check icon and in the OnSelect type:

    SubmitForm(OrderForm)

NOTE: If you try running your application now and you will find your order form disappears!!!!!!!!!!!!!!!…Let’s “fix” this!!

  1. To display the edit forum. Select the Device Gallery chose the “OnSelect” property and type:

NewForm(OrderForm)

 

  1. Click File and select Save.
  2. Click the back arrow.

Congratulations badge: “Writing Data to practically any data source!”
achieved!!!!!!!!!!

 

Done and looking for something else to do?

  1. Apply a theme to your Application for a new look at feel
  2. Add navigation to the header component
  3. Give the controls a responsive lay out
  4. Create your own component for the form submission

 

Use AI to update and improve an existing Paper based System

This section will show to take an existing paper-based system and reduce the effort, integrate it into the new system through artificial intelligence and AI Builder.

This lab will use the forms located in: https://aka.ms/AIADForms. Please download and extract these forms to your local hard drive.

Goals for this lab

 

 


After this lesson you will be able to:

  1. Create an AI Builder Model that can access existing forms
  2. Train an AI Model with existing
  3. Use this model in a canvas application
  4. Add navigate between screens

 

 

 

The time to complete this lab is [60] minutes.

 

  1. Navigate to the AI Builder area of Power Apps

  1. Select “Build” under AI Builder
  2. Start your AI Builder Trial
  3. Select “Form Processing”

 

  1. Name our AI Builder Model “CustomOrder” and select Create

  1. This lab will use the forms located in: https://aka.ms/AIADForms. Please download and extract these forms to your local hard drive. After you have done this select “Add documents”

  1. Add all the forms, with the exception of the Test form to train the model.

  1. Select “Upload 8 documents”

  1. Once the documents are loaded select “Close”

  1. Select Analyze

 

  1. Let AI Builder creates the model

     

 

  1. Select the form to select the fields wanted in the model

 

  1. Select the “All Fields” menu to specify the specific fields

  1. Select the Date field to change the name from “Date” to “InvoiceNo”

 

  1. Select “Next”

Select Train

  1. Select “Go to Details Page”

 

  1. Publish the model. We can now process custom forms in our Device Ordering Application!

  1. Navigate back to our Canvas Application created above. If you have closed it you can navigate back to Solutions > Edit

  1. Inside the Solution select the canvas application created above “Device Ordering Application” and select edit

  1. Add a new screen to process legacy form based and custom requests. (This form may look different than yours due to a custom theme has been applied (Home >Theme))

  1. Rename the new form “CustomDeviceScreen”

  1. Add the Header component and rename if desired.

  1. Add the AI Builder Form Processor control to the form. Move the control the bottom of the screen. Set the Text of the control to “Import Custom Device Form”.

  1. Rename the AI Builder Form Processor from FromProcess1 to CustomDeviceProcessor

  1. Add Text boxes for: Model, Memory and Storage and customizations. Add Labels for Model, Memory and Storage and customizations. (in the example of the font size was increased to 16)

(The space on the right is being reserved for the Power BI integration and a map)

  1. Retrieve the model value from the PDF using the following formula:

LookUp(CustomDeviceProcessor.FormContent.Tables.table_0,“Model”=Part, Description)

  1. Retrieve the memory value from the PDF using the following formula:

LookUp(CustomDeviceProcessor.FormContent.Tables.table_0,“Memory”=Part, Description)

  1. Retrieve the memory value from the PDF using the following formula:

LookUp(CustomDeviceProcessor.FormContent.Tables.table_0,“Storage”=Part,Description)


  1. Set the notes section of the screen by removing the text from default and adding hint text.


  1. You can now run the application, click on the AI Builder Form control labeled “Import Custom Device Form” and load the Test_Contoso Custom Device Order Form.PDF

 


  1. Add navigation back to the main screen by adding a button in the header or footer(in this image I have it in both places)

Navigate(MainScreen)

  1. Add navigation from the first screen to our new Custom Ordering Screen.


  1. In the OnSelect of the label enter:

Navigate(CustomDeviceScren)


 

Using Power Automate approvals to streamline ordering

This section of the training will enhance the existing paper-based system for ordering devices

Goals for this lab

 

 


After this lesson you will be able to:

  1. Add additional screen to your app
  2. Add navigate between screens
  3. Create AI Builder models
  4. Create Approval Flows for ordering custom devices

 

 

 

The time to complete this lab is [60] minutes.

 

Adding an approval flow

  1. Navigate to the Device Ordering canvas Application created above. If you have closed the application, you can navigate back to Solutions > Edit

  1. Inside the Solution select the canvas application created above “Device Ordering Application” and select edit

  1. Open the CustomDeviceScreen screen added in the section above

  1. Add a button that we will use to submit our device ordering request. Insert > Button. Rename this button to RequestOrder

  1. Create a new flow in Power Automate the references the RequestOrder button. To do this select this RequestOrder button, click on Action, select Power Automate and choose “Create a new flow”.

  1. In the Power Automate creation experience, select Power Apps to be the trigger

  1. Add a new step in the flow

  1. Select the action: “Start and wait for an approval”. The easiest way to do this is type: “approval” in the search. Name the flow Device Request Approval.

  1. Set the approval type to: “Approve/Reject- First to respond”

  1. Set the approvers using the “Assigned to:” and for the approval details select: “Ask in PowerApps”. Ensure one of the users in the Assigned to: is the account you are logged in as. If you don’t see “Ask in PowerApps” option, click the see “See More” option in the dialog.

    In the screen shot, it currently has the text “See less”.

  1. Add a condition action to the flow.

  1. Set the condition to test Outcome as being equal to Approve. NOTE: THIS IS CASE SENSITIVE!!!!

  1. Specify the actions for both the approved and rejected states of approval. In this case the action will both send email to the requestor with the subject being approved or rejected. In normal situations the approved stated would write a record to the CDS entity “Device Orders”.

  1. Set the recipient as the person logged in

  1. Set the subject of the approved branch send email as Approved and the body equal to the Power Apps input for the order details.
  2. Repeat for rejected branch

  1. Connect this flow to our Power Apps application. Navigate back to our Canvas application. Select the flow created above.

  1. Select the Device Request Approval and note it is expecting order details from the “Ask in Power Apps” specified in the flow created above.

  1. To make the parameter more legible you may want to rename the text inputs

  1. Pass in one parameter from the text input boxes

  1. Here is the approval request in email.

    NOTE: Approvals take some “warm up” time with the first approval requests taking ~5 minutes and subsequent approvals will often proceed the initial request

     

  1. Here is the Approvals Experience in Power Automate

  1. The resulting email sent

 

 

Done and looking for something else to do?

  1. Modify the flow to include the PDF in the email
  2. Modify the flow to update the CDS entity “Device Orders” in the approved branch

 

Use Portals and Power Virtual Agents bots to offer Self Service Support

Goals for this lab

 

 


After this lesson you will be able to:

  1. Add additional screen to your app
  2. Navigate between screens
  3. Create AI Builder models
  4. Create Approval Flows for ordering custom devices

 

 

 

The time to complete this lab is [60] minutes.

 

Power Virtual Agents, provide exceptional support to customers and employees with AI-driven virtual agents. Easily create and maintain bots with a no-code interface.

If you aren’t familiar with bots, a bot is a computer program that utilizes conversational AI, a bot  can conduct text conversations with your customers to direct them to what they need quickly without requiring your human agents to intervene. Bots provide a great way to answer simple, repetitive questions from your customers and to help them do repeatable tasks like find out how to return or exchange an item, join your rewards program, or cancel an order (which you’ll learn how to do in this training). Bots save your agents time (and your company money) by freeing agents to focus on more complex problem-solving and handle more valuable customer interactions.

 
 

This blog post is a very introductory walk through on how to get started creating your own bot.

Step 1: Navigate to https://powervirtualagents.microsoft.com/en-us/ and select “Try Preview”


Step 2. Log in to some tenant you want to create your bot in. (For this lab it doesn’t have to be the training tenant/account)

This presumes you already have an environment created in your Office Tenant. If you don’t already have a Tenant or environment please see the directions can be found in an App an two hours in the Power Apps training: https://aka.ms/powerappstraining


 
 

Step 3. Create a new bot.

Being there is no bot in your tenant, you will get automatically get prompted to create one.

 
 


Step 4. Set up the bot options

If you don’t want to create your bot in the default environment, you can set this under “More Options”

 

Step 5. That is, it! Your bot is built, and it is time to test it!!!!!!!!

To do this turn on tracing


 
 

Step 6. Add some text that falls into your greeting phrase.


 
 

Step 7. Watch the processing and workflow


Step 8. Customize your bot

Now that you have seen your bot in action, let’s customize it!

The easiest place to start is the greeting button.  If you toggle tracing back off you see this option.


Step 9. Change your greeting


 
 

Step 10. Verify your Updates!

Simply rerun your bot and greet it, the response should now come back with your new greeting!

Step 11. Create a new topic. Click on topics > New Topic. Add triggers and discussion for said topic.

Step 11. Publish you bot for deployment


Step 12. “Deploy” your bot

Click on manage > Channels > Custom website

 

Step 13. Copy the bot URL from the Custom website dialog.

Put Bot in a Portal

  1. Open your portal in edit mode

  1. Scroll down to the section you want your bot

  1. Under components select Iframe

  1. Set the link to the Power Virtual Agents URL

  1. This will automatically update after a couple of seconds

  1. Test your bot in the Power Apps portal using the “Browse Website” option.

Use Power BI Visuals in your PowerApps application

Goals for this lab

 

 


After this lesson you will be able to:

  1. Add additional screen to your app
  2. Navigate between screens
  3. Create AI Builder models
  4. Create Approval Flows for ordering custom devices

 

 

 

The time to complete this lab is [60] minutes.

 

 


https://powerusers.microsoft.com/t5/News-Announcements/Creating-dynamic-Power-BI-Tiles-in-PowerApps/ba-p/370852

&$filter=Store/Territory eq ‘NC’

 

Pick up location using Geospatial Features in Power Apps

In the section above we used Power BI to display store locations. Now in preview there is a new geospatial functionality to enable this functionality directly in Power Apps:

https://powerapps.microsoft.com/en-us/blog/new-geospatial-features-in-power-apps/

In future versions of this training we will show how to do mapping using these new features.

 

© 2019 Microsoft Corporation. All rights reserved.

Information in this document, including URL and other Internet Web site references, is subject to change without notice. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, e-mail address, logo, person, place or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

The names of manufacturers, products, or URLs are provided for informational purposes only and Microsoft makes no representations and warranties, either expressed, implied, or statutory, regarding these manufacturers or the use of the products with any Microsoft technologies. The inclusion of a manufacturer or product does not imply endorsement of Microsoft of the manufacturer or product. Links may be provided to third party sites. Such sites are not under the control of Microsoft and Microsoft is not responsible for the contents of any linked site or any link contained in a linked site, or any changes or updates to such sites. Microsoft is not responsible for webcasting or any other form of transmission received from any linked site. Microsoft is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement of Microsoft of the site or the products contained therein.

Microsoft and the trademarks listed at https://www.microsoft.com/enus/legal/intellectualproperty/Trademarks/Usage/General.aspx are trademarks of the Microsoft group of companies. All other trademarks are property of their respective owners.

© 2019 Microsoft Corporation. All rights reserved.

Jan 17 Webinar: Integrating Bot Framework Skills with Power Virtual Agents

We are excited to announce that the modular and reusable conversation Bot Framework skills can be integrated with Power Virtual Agents.

January 17th 12:00pm PST Senior Program Pawan Taparia and Managers Murali Kumanduri from the Power Virtual Agents team will be hosting a live webinar to walk through what Bot Framework Skills are, how to integrate Bot Framework Skills with Power Virtual Agents and what was just updated with SDK version 4.7 launch.

If you are not familiar with Bot Framework Skills, they are re-usable conversational skill building-blocks covering conversational use-cases enabling you to add extensive functionality to a Bot within minutes. Skills include language understanding (LUIS) models, dialogs and integration code and delivered as source code enabling you to customize and extend as required. They can be a complex Virtual Assistant or perhaps an Enterprise Bot seeking to stitch together multiple bots within an organization.


 

When: January 17th 12PM PST

 

About our presenters:

Pawan Taparia

Senior Program Manager, Microsoft Corporation. Building intelligent conversational virtual agents using Power Virtual Agents. Creative and self-driven product manager with over 11 years’ of experience building and shipping consumer and enterprise technical solutions across retail, academia, healthcare & technology.
* Experienced leader with a track record of mentoring & guiding teams across disciplines to run a outcome driven development for delivering software solutions end-users and partners want
* Proven ability to innovate in all stacks of technology from embedded hardware, mobile app to cloud technology
* Strong execution and prioritization skills in delivering outcomes spanning product teams & divisions on time & with high quality
* Deep analytical skills with experience building data models to influence product direction


 

Getting your first Bot Running

 

I wanted to play with Power Virtual Agents Skills and needed to build a bot by hand and must be the most unlucky person in the world as I just seemed to hit issue after issue getting a bone stock SDK based Azure bot up and running with the Azure SDK

The issues I ran into the:

  1. The referenced solution on Git Hub fails to compile with the error: “The Current .NET SDK does not support targeting .NET Core 3.0”
  2. The bot solution on github fails to run with the error ‘Service EndPoint for CosmosDB is required. (Parameter ‘CosmosDBEndpoint’)’
  3. The bot solution on github fails to run with the exception from the TranscriptLoggerMiddleware()
  4. Despite being able to run and interact from the VS debugger, the Bot Framework Emulator refuses to bind to the local bot
  5. The Bot Framework Emulator refuses to bind to the published bot

 

 

 

 

Issues with the Answers I found:

  1. The referenced solution on Git Hub fails to compile with the error: “The Current .NET SDK does not support targeting .NET Core 3.0”

Resolution: Upgraded to using Visual Studio 2019

  1. The bot solution on github fails to run with the error ‘Service EndPoint for CosmosDB is required. (Parameter ‘CosmosDBEndpoint’)’

Resolution: Downloaded the sample from the Azure Portal rather than using the SDK.

Other samples do require this and directions can be found here: https://docs.microsoft.com/en-us/azure/bot-service/dotnet/bot-builder-dotnet-state-azure-cosmosdb?view=azure-bot-service-3.0

 

  1. The bot solution on github fails to run with the exception from the TranscriptLoggerMiddleware()

Resolution: Downloaded the sample from the Azure Portal rather than using the SDK.

  1. Despite being able to run and interact from the VS debugger, the Bot Framework Emulator refuses to bind to the local bot

Resolution: Supplied the Aplication ID and Password to the emulator from the JSON

 

  1. The Bot Framework Emulator refuses to bind to the published bot

Resolution: In simulator settings set the path to the ngrok network tunneling software.

Power Platform Sessions at Community Summit Barcelona

 

Working on a list of Microsoft sessions for Community Summit in Barcelona…please note this is still draft while I confirm the speakers!

 


 

April 9-12 the Power Platform product team will be in Barcelona for the Community Summit which brings users and partners of the Microsoft Business Applications platform together to learn, collaborate, and connect about Dynamics 365 and Power Platform Applications.

Free of sales and marketing gimmicks, this event is designed and curated by the community to share real learnings, actionable practices, and valuable lessons, delivered by the experts in the industry, so you can put your new bits of knowledge to use the very next day. Enjoy Barcelona in springtime, and get ready for 4 days of value-packed learning, connecting with like-minded peers, lunch meals and a nice welcome reception on the house, and the most fun you’ve had at a Community Summit ever.

To register please see: https://www.summiteurope.com/

 

Power BI Sessions

 

Building enterprise-grade models with Power BI Premium

Power BI Premium enables you to build comprehensive, enterprise-scale analytic solutions that deliver actionable insights through familiar data visualization tools such as Microsoft Power BI and Microsoft Excel. This session will dive deep into exciting, new and upcoming features including aggregations for big data to unlock petabyte-scale datasets that was not possible before! We will uncover how the trillion-row demo was built in Power BI on top of HDI Spark. The session will focus on performance, scalability, and application lifecycle management (ALM). Learn how to use Power BI Premium to create semantic models that are reused throughout large, enterprise organizations

 


Kasper de Jonge is Principal Program Manager on the Power BI team at Microsoft. Over the past decade at Microsoft, he has developed features for Power BI, Power Pivot, and other Analysis Services products, such as the Tabular model. He is frequently a speaker at conferences such as Microsoft Data Insight Summit, Ignite, SQLPASS, and SQLSaturday, and he is the creator of https://www.kasperonbi.com, one of the leading Microsoft Power BI blogs. He lives in the Netherlands.

 

Microsoft Power BI: Delivering business value with AI

Learn about the latest AI capabilities in Power BI and the upcoming roadmap with a focus on the latest changes in Q&A, AI visualizations, and AutoML. Learn how these innovations can deliver business value.


Justyna Lucznik


is a program manager in Power BI team focusing on AI features on the product and service. In this interview, she talks about AI features announced in Microsoft Ignite 2018 in Power BI Desktop, Power BI Service, and Power Query.

 

Working with Data in the Power Platform

Data is critical for the success of every organization. The Microsoft Power Platform (Power BI, PowerApps and Flow) provides a suite of tools to measure, act and automate processes around data. This foundational session gives you a 360-degree view for how to connect to data from any data source, shape, and size and get it ready to be used within all the Power Platform tools and experiences.

 


Miguel Llopis
works as a Program Manager in the Power Query team at Microsoft.
Power Query delivers market-leading Data Connectivity and Data Preparation capabilities for Power BI, Excel and Analysis Services.

 

Power Apps Sessions

 

What is new and exciting for Power Apps by Evan Chaki or Clay Wesener

This session will look at the large milestones just shipped and the future of the maker experience in the Business Applications platform, including details on what it means that Flow and canvas PowerApps.

Otherwise: Marco Rocca    PowerApps and Flow – Best practice for best support Power Automate

 


Evan Chaki

Leading organizations into profitable ventures through calculated strategies.
Expertise in strategic planning, client relationships, operational efficiency, project management and team achievement. Senior manager with a business and technology background.
Specialties: CRM, Business Process Automation, Architecture, Business Intelligence, Process Improvement

 

Introduction and Roadmap for AI Builder, the no-code AI experience of the Power Platform

AI Builder es la nueva funcionalidad de inteligencia artificial en PowerApps y Flow (Power Automate). Está será una sesión con numerosas demos donde podrás aprender cómo añadir inteligencia artificial a tus aplicaciones y procesos sin necesidad de tener ninguna noción de programación o data science.

La sesión será liderada por Joe Fernandez de Microsoft.


Joe Fernandez
Program Manager, Microsoft Joe is an amazing community advocate, single handedly answers most of the forum questions and a Program Manager on the AI Builder team at Microsoft.

 

 

Introducing Power Apps portals for external users

Learn how Microsoft Power Apps customers can create websites over data stored in Common Data Service that can be accessed by external users with a wide variety of identities including personal accounts, LinkedIn, and other Azure Active Directory organizations as well as allow anonymous browsing of content.

 

Dileep Singh

is a Senior Program Manager at Dynamics CRM. He has a wide scope and knowledge of Business solutions and applications. In his current position at Microsoft, Dileep is responsible for CRM Customer Service and portals. In addition to that, he has worked in past on a variety of areas like SharePoint Integration, Application infrastructure etc. A Bachelor Tech degree holder from NIT Allahabad, India and has been working in Microsoft from last 6 years.

 

Power Automate Sessions

 

Introducing UI flows to Power Automate

This session will introduce you to the next level of application automation with UI Flows. UI Flows Robotic process automation (RPA) feature within Microsoft Power Automate that helps you save time and effort. Enable anyone to automate manual business processes across all on-premises and cloud apps and services.

 


 

Stephen Siciliano

 is a Principal Group Program Manager at Microsoft. He believes that there is not a single User Interface that cannot be improved. His passion is to identify and execute on such improvements.  

Stephen enjoys being outdoors, hiking and running trails. He enjoys traveling and considers himself a transit enthusiast. 

 

Intelligent automation with Power Automate by Stephen Siciliano

 


 

Stephen Siciliano

 is a Principal Group Program Manager at Microsoft. He believes that there is not a single User Interface that cannot be improved. His passion is to identify and execute on such improvements.  

Stephen enjoys being outdoors, hiking and running trails. He enjoys traveling and considers himself a transit enthusiast. 

 

 

Power Virtual Agents Sessions

 

Getting Started with Power Virtual Agents by Charles Sterling

In this nearly all demo session we walk through how to get started with Power Virtual Agents, If you haven’t heard of Power Virtual Agents, they empower teams to easily create powerful bots using a guided, no-code graphical interface without the need for data scientists or developers. Power Virtual Agents addresses many of the major issues with bot building in the industry today. It eliminates the gap between the subject matter experts and the development teams building the bots, and the long latency between teams recognizing an issue and updating the bot to address it. It removes the complexity of exposing teams to the nuances of conversational AI and the need to write complex code.


Charles Sterling (Chuck) came to Microsoft from being a marine biologist working for United States National Marine Fisheries doing marine mammal research on the Bering Sea. He started out at Microsoft supporting Excel and moved through a couple of support teams to being an escalation engineer for Microsoft SQL Server. Taking his love for customers (and diving), Chuck moved to Australia as a product manager and developer evangelist for the .NET Framework. In 2008 he moved back to Redmond as a Visual Studio program manager then joined the Power Platform group focusing on Power BI and now continues his community passion and looking after the PowerApps influencers and MVPs.

 

 

 

Hands-On Labs

Creating your own bot with Power Virtual Agents

In this 2 hour hands on labs we will be build your very own bot! If you haven’t heard of Power Virtual Agents, they empower teams to easily create powerful bots using a guided, no-code graphical interface without the need for data scientists or developers. Power Virtual Agents addresses many of the major issues with bot building in the industry today. It eliminates the gap between the subject matter experts and the development teams building the bots, and the long latency between teams recognizing an issue and updating the bot to address it. It removes the complexity of exposing teams to the nuances of conversational AI and the need to write complex code.

 


Charles Sterling (Chuck) came to Microsoft from being a marine biologist working for United States National Marine Fisheries doing marine mammal research on the Bering Sea. He started out at Microsoft supporting Excel and moved through a couple of support teams to being an escalation engineer for Microsoft SQL Server. Taking his love for customers (and diving), Chuck moved to Australia as a product manager and developer evangelist for the .NET Framework. In 2008 he moved back to Redmond as a Visual Studio program manager then joined the Power Platform group focusing on Power BI and now continues his community passion and looking after the PowerApps influencers and MVPs.

 

 

Power Apps AI Builder in two Hours

In this 2 hour hands on lab you will get an introduction to the four major AI model types and walk through how to get forms processing working in your very own Power Apps application!


Joe Fernandez
Program Manager, Microsoft Joe is an amazing community advocate, single handedly answers most of the forum questions and a Program Manager on the AI Builder team at Microsoft.

 

 

Power BI & AI: Better Together

In this 2-hour hands on lab Justyna will walk the audience how to easily take your Power BI reports to the next level with the addition of AI.

 


Justyna Lucznik


is a program manager in Power BI team focusing on AI features on the product and service. In this interview, she talks about AI features announced in Microsoft Ignite 2018 in Power BI Desktop, Power BI Service, and Power Query.

 

AI Builder Object Detection Lab for Power Platform World Tour

Object detection

 

Object detection can be used to expedite or automate business processes in multiple industries. In the retail industry, it can be used to expedite the inventory management, allowing retail leaders to focus on on-site customer relationship building. In the manufacturing industry, technicians can use it to speed up the repair process to quickly pull out the manual of a piece of machinery for which the UPC/serial number isn’t standing out.

AI Builder object detection will allow companies of any size to add these capabilities for their own custom objects to their apps.

Object detection lets you count, locate, and identify selected objects within any image. You can use this model in PowerApps to extract information from pictures you take with the camera, or load into an app.

In this lab, we will build and train a detection model and build an app that uses the detection model to identify objects from available images.

Note: If you are building the first model in an environment, click on Explore Templates to get started.

 

Setup

Object detection maps objects to a Common Data Service Entity. To get started we need to create this entity.

Step 1. Log in to Power Apps.

Step 2. Navigate to “Data” and Select Entities and New Entity

 

Step 3. Create a new Entity.

Step 4. Add a field for inventory total named: aib_inventorytotal as type whole number

 

Step 5. Navigate to Data to add our products

Step 6. Add our Three Products

Green Tea Rose

Green Tea Cinnamon

Green Tea Mint

 

 

Step 7. Verify the data was entered into the entity

 

Exercise 1

In this exercise we will build and train the Object Detection model for three varieties of tea.

  1. In PowerApps maker, expand AI Builder and select Build. Select Object Detection.

 

  1. Name your model Green Tea Product Detection _Your name and
    Click create.

  1. Your screen should now look like the image here.

  1. Notice the progress indicator on the left. Those are the steps we will follow now to build and train our model.

  1. We are now going to define the objects we are tracking. Click on the Select object names.

 

  1. From the entity list, select Object Detection Product.

 

  1. Select the Name field and click Select field.

  1. Select the tea items and click Next.

 

  1. Notice the progress indicator has moved forward to the Add images step.

  1. Click add images.

     

    Images can be found here

  1. Select images from the set provided. You will need enough images to provide 15 samples for each type of tea we are tracking.

  1. Approve the upload of images. Click Upload images. After the upload completes, click Close.

 

  1. Click next to begin tagging the images.

  1. Select the first image to begin tagging.

  1. Hover over the image, near an item you wish to tag. A dotted-lined box should appear around the item. It has been detected as a single item that can be tagged.

  1. Click on the item and select the matching object name.

  1. If the pre-defined selector is not accurate, as in the below example, you can drag the container to draw it to accurately tag the item.

  1. Do this for each item in the image and for each image in your set. When you have tagged all of the images you uploaded click Done Tagging in the top right of the screen.

  1. Once you have completed tagging, you will get a summary of the tags. If you haven’t tagged enough for analysis, you will need to load and tag more examples.

 

  1. Once you have defined enough tags for training the model, you will be allowed to initiate the training. Click Next.

  1. Click Train.

  1. The training takes a few moments.

  1. Navigate to the saved model view and confirm your model has completed training.

  1. Select the model you just made.

  1. Select Quick test.

 

  1. Upload or drag and drop one of your test images to be analyzed.

     

  2. You will see the analysis and level of confidence for the match.

 

  1. Upload an image you know will not match. You will see the analysis and level of confidence for the match.

  1. Click close.
  2. Publish your model.

 

Exercise 2

We will now create a canvas app you can use for detecting the items that have been trained in our model. The product will be detected from the image and you will be able to adjust on-hand inventory for the item.

  1. Navigate to Apps, and select Create an app, then select Canvas. If asked, grant permission for the app to use your active CDS credentials.

  1. Select Blank app with Phone layout.

  1. On the maker canvas, select the Insert tab in the ribbon and expand AI Builder. Select Object detector to place this control on your app.

  1. Select the AI model you built.

  1. Resize the control to better use the space.

  1. Make sure to leave room for more items we will be placing soon.

  1. Play your app.

  1. Click on Detect.

  1. Choose one of your test images and click Open.

  1. The image will now be analyzed.

  1. Our model has detected each tea in the image.

  1. Exit the app player.

 

Bonus exercise- build out the data in your canvas app

 

  1. We will now select our data source. Select View from the ribbon and select Data Sources.

  1. Click + Add Data Source.

  1. Add the Common Data Service data source. Do not use Common Data Service (current environment).

  1. Select the Object Detection Products entity and click Connect.

  1. Close the Data pane.
  2. With Screen1 selected in the Tree view, navigate to the Insert ribbon tab, expand Gallery and select Blank vertical gallery.

  1. Rename the Gallery productGallery. You are re-naming the gallery so you can reference it from your formulas.

  1. Resize and move the gallery control to fit the available space on the screen, leaving some space at the bottom for using later.

  1. Select the edit icon from the gallery.

  1. Add a label to the gallery.

  1. Click edit again and add a Text input box to the gallery. Resize and place it to line up with the label we’ve already placed. We will be updating inventory counts in this text box.

  1. Rename the Text Input inventoryInput. You are renaming this control so you can reference it from your formulas.

  1. With focus on the Screen1 in the Tree view, click in the ribbon on Insert and select Button.

  1. Drag and move the button to the bottom of the screen, double click on it to edit the text. Rename it to Update.

  1. We will now add the user message to give the user confirmation their submission was accepted; we will define this logic later. With focus on Screen1, insert a label, drag it to the bottom of the screen.

 

  1. We will now add logic to the controls we’ve placed on the screen. Select the Gallery and replace the Items formula with the following.

    ‘Object Detection Products’

  1. Select the label in your gallery. Replace the Text formula with the following:

    ThisItem.Name

  1. Select inventoryInput and replace the formula for Default with the following:

    LookUp(‘Object Detection Products’,Name = ThisItem.Name).’Inventory Total’

  1. Select the other label (the one that shows at the bottom of the screen) and replace its text with the following:

    usermessage

  1. You’ll notice that area now looks blank. We will configure that message in our next step.

  1. Select the button control and replace the OnSelect with the following:

    ForAll(productGallery.AllItems,Patch(‘Object Detection Products’,LookUp(‘Object Detection Products’,Name=DisplayName),{‘Inventory Total’:Value(inventoryInput.Text)}));Set(usermessage,”Updated ” & CountRows(productGallery.AllItems) & ” items”)

  1. Play the app again.
  2. Click Detect.

  1. Select an image to evaluate.

  1. Update the quantity for the correct product and click Update.

  1. The bottom should show a message now.