Video summary

Power Apps (Control de Stock) - Video 4

Main summary

Key takeaways

Technology

Technology / product setup (Power Apps + SharePoint)

  • The instructor continues using an existing SharePoint site and its lists as the data source for the Power Apps “Stock Control” app.
  • They link previously created Excel dynamic pivot tables to SharePoint lists so that when data is uploaded/linked, it populates the corresponding SharePoint lists.
  • They verify the existing SharePoint lists in Site Content and create any missing ones.

SharePoint list permissions (security)

They explain SharePoint permission levels, focusing on the first-level idea:

  • Users can at least view the app and share it with the whole organization.

They also note:

  • List-level permissions can be managed via ellipsis (…) → Settings/Configuration.
  • Permissions typically inherit from the site unless inheritance is stopped.
  • They intentionally avoid making every user able to see all lists, since some tables should remain hidden.

Creating SharePoint lists from Excel + schema details

The instructor creates/ensures SharePoint lists for:

  • Products
  • Users
  • Officials (customers)
  • Clients
  • Suppliers
  • Sales
  • Sales Items / line items (product + pricing + quantities per sale)

For each list, they:

  • Use New → List → From Excel
  • Set a field to act as Title
    • They mention adding an extra “title” field for convenience, since using the app’s code field as “Title” can be awkward during development.
  • Define fields and data types (e.g., text and numeric fields).
  • Emphasize updating column data types as needed, including avoiding over-allocation (e.g., an ID that shouldn’t require a long “255 spaces” text field).

They build sales lists with relationships in mind:

  • Client relationship: uses numeric ID fields (linked by client ID).
  • Employee relationship: uses numeric ID fields.
  • Prices, totals, discounts: stored as numbers.

Export / offline access

  • They explain you can download/share SharePoint list data from SharePoint in Excel-compatible formats by exporting the SharePoint list.
  • They mention Power Apps / SharePoint offline (desktop) access as well.

Power Apps integration steps (linking lists to the app)

  • In Power Apps, they open the app and go to Data sources.
  • They add the remaining SharePoint connectors/lists using the SharePoint connector, selecting:
    • the SharePoint site
    • the lists not linked yet (examples: sales, suppliers, sales items, customers)
  • After connecting, the app can directly call those connected tables.

Login/authentication logic (using SharePoint users table)

  • They use an image/control to obtain info about the logged-in user, leveraging session data rather than manually asking for usernames.
  • They still implement a login flow with:
    • Text input: login user
    • Text input: login key
    • Validation: if either input is empty, show an error message for ~2 seconds.

To validate credentials:

  • They run a search query against the Users table to retrieve a single matching record where:
    • the user field equals the “login user” text
    • the key/password field equals the “login key”
  • They store the result in a variable (noted as a record variable created dynamically).
  • If the variable is empty, they handle the “not found” case by resetting objects.

Minor implementation note from subtitles: They clarify separator syntax differences: the Spanish version uses semicolons (and mentions double semicolons) versus English single semicolons/commas.


Product browsing UI (Power Apps screen + gallery design)

  • They create a new screen: “Product view”.
  • UI components include:
    • Header label (“Product view”)
    • Back navigation icon (OnSelect → Back)
    • A vertical gallery bound to the Products data source

Gallery design tweaks

They configure:

  • Selected-row highlighting using: If(record is selected) → color, else transparent
  • Separators/borders and label placement for:
    • code
    • description
    • stock
    • wholesale/retail pricing
    • category
    • and related fields

Category table addition

  • They realize a Category table is needed.
  • They define/create a Category list with fields like:
    • Category description
    • Extra information
    • They state they don’t explicitly include an ID because SharePoint provides the ID.
  • They add the Category table to SharePoint and re-check that Power Apps recognizes it.
  • They explain displaying category name vs category ID/code through relationship fields (e.g., using .category to show code vs retrieving the actual category text they want).

Product actions: modify, delete, add

Inside the products gallery, they add controls for:

  • Modify (button, e.g., green)
  • Delete (icon button, e.g., red)
  • A “new product” button

Filtering products (radio + text input)

They implement filtering using:

  • A label and a filter by choice using a radio/select control
    • The control’s Items/selection values determine whether the gallery filters by:
      • code, description, category, etc.
  • A text input where users type what to filter
  • Layout settings (e.g., horizontal layout, padding/top/left) to ensure correct rendering

Main speakers / sources

  • Main speaker: Unspecified instructor (autogenerated subtitles; no names provided)
  • Primary source referenced: Microsoft Power Apps + SharePoint (with Excel pivot tables used to create SharePoint lists)

Original video