Video summary

Power Apps (Control de Stock) - Video 3

Main summary

Key takeaways

Technology

Power Apps tutorial: building a login + initial menu (Control de Stock – Video 3)

Creating the app (Blank canvas)

  • In Power Apps, create a new app from the Power Apps environment (Apps list → Create).
  • Choose Blank canvas to start from scratch.
  • When using blank canvas, Power Apps asks for the target device type:
    • This tutorial selects tablet (also compatible with desktop).

After creation, the interface is configured with:

  • Canvas/form (center)
  • Left panel: toolbox + app view + variables/collections + data sources
  • Right panel: properties for the selected UI element

The video notes that you can insert elements such as:

  • Multimedia
  • Power Automate flows
  • Plugins
  • (As needed)

Building the Login screen

  • Rename the initial screen to login.
  • Add UI components:
    • A rectangle for background/appearance, with an option to insert a logo (from multimedia)
    • Text labels:
      • “User” (bold, ~20)
      • A label for the password (“Key” in the subtitles)
    • Text inputs:
      • Username: login user
      • Password:
        • Set the text input’s mode to Password
  • Add two buttons / login options:
    • One for guest mode
    • (The tutorial mentions permissions are evaluated based on the selected mode.)
  • Load the user’s avatar/profile image:
    • Use an image control with the Image property set to the current logged-in user’s photo (via the user function).
    • Assign user info to labels such as “login user” / “login key”.

Adding a Menu screen

  • Create a new blank screen named menu.
  • Add basic elements:
    • A rectangle placeholder
    • A button for the first menu option
    • A log out button is mentioned (set up later)

Connecting to data sources (SharePoint)

To implement the menu/login logic, the app must connect to a data source.

Steps shown

  1. Go to Data → Add data → Connectors
  2. Select SharePoint
  3. Choose an enabled SharePoint connection
    • Different sites are treated as different data sources.

Notes

  • SharePoint typically exposes document libraries (files).
  • It can also be used with relevant lists/records, depending on the app’s needs.
  • The video connects multiple SharePoint sources (“add all three now”) and demonstrates managing connections via:
    • three dots → Edit / Update / Remove

Login logic (formula approach)

Conditional validation (required fields)

  • Use the button’s OnSelect (the On… property) to trigger login logic.
  • Implement an IF condition:
    • If the username textbox is empty / contains nothing:
      • Show a Notify message:
        • “Enter your username and password to continue.”
      • Demonstrates notification type (e.g., error) and duration using milliseconds (example: 2000 ms).

Querying the SharePoint “Users” list/table

Because querying returns full records, variables are used.

  • Use Set(...) to store the query result into a variable (e.g., varUser).
  • Perform a lookup-style search for a single record:
    • From the Users source/list/table
    • Filter conditions:
      • User field equals the login user textbox value
      • Key/Password field equals the password textbox value

Then check:

  • If(IsBlank(varUser), ...)
    • If empty: show “incorrect username or password”
  • Otherwise: navigate to the menu screen using Navigate(...).

Publishing and testing

  • Save the app and then publish (example version: 1.0).
  • Test behavior described:
    • If fields are empty → displays “enter username and password”
    • If fields don’t match a record in SharePoint → shows “incorrect username or password”

Resetting inputs after failure

  • The tutorial attempts to clear fields (username/password) after errors.
  • Uses:
    • Reset(...) (to reset text input behavior)
  • Notes:
    • Refresh may be mentioned as a way to update data sources, but is clarified as not necessary just to clear input fields.
  • Also mentioned:
    • A small formula editing issue (extra parentheses), which is corrected.

Main sources / speakers

  • Primary speaker: The instructor/creator guiding the Power Apps steps (no name provided in subtitles)
  • Systems/tools referenced as “sources”:
    • Microsoft Power Apps
    • SharePoint (authentication/user data source)
    • Power Apps formula language (e.g., If, Set, lookup, Navigate, Notify, Reset, IsBlank)

Original video