Power Pages • Form Metadata, Subgrid & Notes Configuration

Series Recap

  • 30-day Power Pages Learning Challenge; this is Video 10.
  • Covered so far:
    • Fundamentals & history of Power Pages/Power Apps Portals.
    • Portal life-cycle & core components.
    • Licensing & pricing.
    • Hands-on labs: creating a trial, designing a first website, using local Notorious resources.
    • Content Snippets for design customization.
    • Security fundamentals: authentication, authorization, web-roles, table permissions, Azure AD B2C setup (Video 9).

Today’s Topic – Form Metadata

  • Property set that extends or overrides Dataverse form components exclusively for portal users.
  • Two form types supported:
    • Basic Form (single step)
    • Multistep Form (wizard style)

Why We Need It

  • Keep Dataverse (internal CRM) settings intact while presenting different behaviour or labels to external portal users.
  • Examples:
    • Show “Email Address” label on portal, leave “Email” inside CRM.
    • Make a field optional internally but mandatory on portal.
    • Convert lookups to dropdowns to avoid modal pop-ups.
    • Render PCF controls / custom code components.
    • Subgrid tweaking: show / hide search, add, download, edit, delete icons.
    • Add Regex validations (email, phone, SSN, postal code).
    • Auto-populate data on load/save (current user, today’s date).
    • Provide field-level descriptions/instructions.
    • Transform Choices into vertical / horizontal radio buttons.

Components You Can Target

  • Attributes (fields)
  • Sections
  • Tabs
  • Notes
  • Timelines
  • Subgrids

Key Properties (Attribute-Level)

  • Label – override text displayed to portal user.
  • Control Style – lookup-as-dropdown, horizontal/vertical radios, code-component (PCF).
  • Auto-Populate on Load / on Save
    • Type: Current Portal User, Query String, Parent Lookup, etc.
    • Source Attribute: any column on current contact (e.g.
      ContactID , Full Name, Email).
  • Description & Instructions
    • Use Dataverse description or custom text.
    • Position: Above Field / Below Field / Above Label.
  • Validation – Regex pattern & custom error message.
  • Field Is Required – override to Required / Optional / Recommended.
  • Basic Form for Create – provides “+ New” inside a lookup.
  • Notes / Subgrid / Timeline specific sets (create/edit/delete enable, file size limits, button labels, column overrides, etc.).

Designer Studio vs Portal Management App

  • Form metadata currently managed only in Portal Management App, not Designer Studio.
  • Metadata is stored as child records under each Basic Form or Multistep Form (1:many relationship).

Practical Walk-Through (Publish Event Scenario)

1. Auto-Populate “Published By” Lookup

  1. Open Portal Management App ➜ Basic Forms ➜ Pick Publish Event form.
  2. Subgrid "Basic Form Metadata" ➜ New.
    • Component Type = Attribute.
    • Attribute = Published By.
    • Scroll to Auto-Populate on Load ➜ Yes.
    • Type = Current Portal User.
    • Source Attribute = ContactID.
  3. Save / Sync ➜ Preview site; field now pre-filled with logged-in contact.

2. Auto-Populate “Created On” with Today’s Date

  • Repeat steps, Attribute = Created On.
  • Auto-Populate on Load ➜ Type = Current Date.

3. Convert Lookup to Dropdown (Optional Demo)

  • Attribute → Control Style = Lookup as Dropdown.

4. Make “Speaker Profile” Field Mandatory Only on Portal

  • Attribute = Speaker Profile.
  • Field Is Required = Yes.
  • Error Message: “Speaker Profile is required for submission.”

Subgrid Configuration Example (Session Registration)

  1. Dataverse form “Portal Edit Event Form” contains subgrid “Session Registration”.
  2. Metadata:
    • Component Type = Subgrid ➜ Select subgrid record.
    • Create Enabled = True.
    • Create Form Source: Web Page → Call for Speaker (multistep form).
    • Button Label = “Add Session”.
    • Download Enabled = True (“Download Sessions”).
    • Allow Edit / Delete / Details links, Search, Paging, etc.
    • Column Overrides: e.g., change “Created On” heading to “Published On”.
  3. Sync ➜ Portal now displays Add, Edit, Delete, Download buttons & updated column header.

Timeline & Notes Configuration

Enable Notes Create/Edit/Delete

  1. Metadata: Component Type = Notes.
    • Create Enabled = True.
    • Editing Enabled, Delete Enabled = True.
    • Attachment Enabled = True (Location: Dataverse or Azure Blob).
  2. Security prerequisite – Table Permissions:
    • New Table Permission → Table = Note (Annotation).
    • Access Type = Parental.
    • Parent Permission = Publish Event permission (with Append, Append To).
    • Privileges: Read, Create, Append, Append To, Update, Delete.
  3. Sync & test: Users can add/edit/delete notes and upload files.

Show Activities on Timeline

  • Add Site Setting:
    • Name: Timeline/DisplayAllUserActivities
    • Value: true
  • Enables e-mail, phone call, appointment, task, etc. on same timeline.

Additional Capabilities Mentioned

  • Render any PCF (Power Apps Component Framework) control – locate components in public PCF Gallery.
  • Regular expressions avoid custom JavaScript.
  • Auto-populate parental lookups or query-string values.
  • File size limits for attachments.
  • Subgrid child-creation still requires proper table permissions with Create privilege.
  • Designer Studio soon to support metadata editing (road-map announcement).

Ethical / Practical Implications

  • Separation of internal vs external UI/UX maintains security boundaries.
  • Avoids over-customization of CRM forms solely for portal needs.
  • Ensures accessibility: clearer labels, instructions, required flags for public users.
  • Minimizes custom scripts (maintenance burden) by leveraging out-of-box metadata & regex.

Coming Up Next

  • Next video: Liquid Templates & advanced home-page design.

Quick Reference – Common Regex Snippets

  • Email:
    ^[\w.-]+@[\w.-]+.\w{2,}$
  • US Phone:
    ^(?(\d{3}))?[- ]?(\d{3})[- ]?(\d{4})$
  • US ZIP:
    ^\d{5}(-\d{4})?$