Building an Iframe-Based Gallery Control in Power Apps (PCF)
Functional Overview From a functional perspective, the control does three main things: Loads a web resource inside an iframe Sends data to the iframe to render a gallery Listens to user actions from the iframe and exposes them as outputs What the User Sees A gallery rendered inside an iframe Data-driven columns and rows Actions like: Selecting records Editing a single record Deleting one or many records with a reason Copying a record All UI logic lives inside the iframe. The PCF control acts as a bridge between Power Apps and that UI. Key Inputs and Outputs Inputs (from Power Apps) The control expects JSON-based inputs: webResourceUrl – URL of the HTML/JS gallery columnsJson – Column definitions dataJson – Records to display deleteReasonJson – Allowed delete reasons These are passed as strings and parsed at runtime. Outputs (to Power Apps) The control exposes two outputs: selectedRecordJson actionType Togeth...