PCF Controls (Power Apps Component Framework) Flashcards
7 cards from real PL 400 practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 PCF Controls (Power Apps Component Framework) flashcards as text
Which PCF context API provides methods to format dates, numbers, and currency values according to the current user's locale?
Answer: context.formatting
`context.formatting` exposes methods such as `formatDateShort`, `formatDecimal`, and `formatCurrency` that automatically respect the user's regional settings stored in Dataverse.
What does `context.webAPI` enable a PCF control to do?
Answer: Perform CRUD operations (create, retrieve, update, delete) on Dataverse records from within the control
`context.webAPI` is the Dataverse-specific data access layer built into the PCF framework, providing methods like `createRecord`, `retrieveRecord`, `updateRecord`, and `deleteRecord`.
What is the recommended approach for supporting multiple languages in a PCF control's UI text?
Answer: Define resx string resource files in the manifest and retrieve translated strings at runtime via context.resources.getString('key')
PCF's native localization model uses .resx files declared in the manifest; the framework loads the appropriate file based on user language and exposes strings through `context.resources.getString()`.
In the PCF manifest, what is the behavioral difference between a property with `usage='bound'` versus `usage='input'`?
Answer: 'bound' enables two-way data flow (read and write); 'input' is read-only (the control cannot push values back)
A 'bound' property participates in two-way binding — the control can both read the current value and write a new value back via `notifyOutputChanged` and `getOutputs`; an 'input' property is read-only from the control's perspective.
Which PCF API should a developer use to determine whether the control is running in a web browser, a mobile app, or a tablet app?
Answer: context.client.getClient()
`context.client.getClient()` returns a value from the ClientType enum (Web, Mobile, Tablet) that allows the control to adapt its layout and behavior for the current client.
What is the correct way to include an external npm library such as Chart.js in a PCF control?
Answer: Install it with npm, import it in the TypeScript source, and let Webpack bundle it automatically during `npm run build`
PCF projects use a standard npm + Webpack pipeline; installing a package with npm and importing it in TypeScript causes Webpack to bundle the library into the output file automatically when `npm run build` is executed.
What does `context.mode.isControlDisabled` indicate, and how should a PCF developer respond to it?
Answer: The host has locked or disabled the field, so the control should render in a non-interactive, read-only state
When `context.mode.isControlDisabled` is true, the host form has disabled the underlying field (e.g., via a business rule), and the control must reflect this by preventing user interaction and rendering in a read-only state.