Power Apps - Creating a Power Application from scratch and Connecting to Data Sources

Creating a Power Apps Application from scratch

Microsoft Power AutomateHere I will outline the steps to creating a new Power Apps application from scratch.

  1. Go to the PowerApps Home Page.
  2. Click on Make your own app - Canvas app from blank
  3. Name your new application and choose the layout format then click Create.
  4. You now have your new application created now you will need to connect it to your data sources and don't forget to save it. Building PowerApps directly from a list automatically saves your application, this method does not.
Connecting to Data Sources

Connecting data sources to your Power Apps application

  1. If you created a new application right in PowerApps from scratch you will start off with no data connected to your application.
    • Starting with a blank site, you will have to create the screens yourself from scratch and also connect your data sources as well.

  2. First thing to do after the new application opens up is to configure your data sources.
    • Click on the Data Sources icon on the left side of the screen.
    • Click on "Connectors" to see available data connectors for you to use.
    • If you want to display any user profile information you will need to select the Office 365 Users connection.
      Most Southwest forms display users profile data at the top of the form so you will most likely need this data connector.
    • To connect your form up to your SharePoint list you will need to select the SharePoint connector.
      -Then select your site from the Recent Sites options.
      -Then select the checkbox next to your list.
    • You then want to click on the screen stack icon to start working on your form.

Customizing and building the form

  1. If you selected the horizontal form option you will need to add a form to your initial screen.
    -Place a form on the page (screen) and connect it to the data source you just added.
    -Select your data source from the Data source drop-down.
    The fields from the SP list will populate onto the screen automatically, it's very cool.
    • You can hide fields easily by turning their visibility off or you can also delete them. If you want to pass form data to the list via "Hidden Fields" you can populate the form field with user data such as their ID, then hide the field and that data will still be passed through when the user submits their form.
    • Standard field width is 455 and covers 1/3 of the screen for Horizontal forms. You can widen fields to 2/3 or full width by increasing the width of the Data card. 1/3 width is 455, 2/3 width is 910 and full screen width is 1365.

  2. You must set the "Item" value to the First record on the form or else you will receive a "Getting Your Data" error on launching the application.
    "SpillReport" is the name of the SharePoint list your report is connected to.
  3. Note: You must have at least one entry in the database for the form to initially load without getting the "Getting Your Data" error.

  4. To send users to another page after the form submits you add the code to the OnSuccess field of the form.
    ExitScreen1 is the name of the screen you create where you put your message to the user thanking them for successfully submitting the form. Fade is the screen transition type, if you want one.

  5. To add your own "Submit" button to the form you will insert a "Button" control to the form and the OnSelect code for the form will be: SubmitForm(FormName)
  6. To add a "Clear Form" button or icon to your form you can insert a "Button" or "Icon" to the page and the OnSelect code for the form will be: ResetForm(SpillReportForm);Back()

    The ResetForm will reset the form defined in the (). After the semicolon the Back() actually refreshes the screen.