PL-400 practice question 19 of 35

A company uses a model-driven app to record details of laboratory test. You are asked to create a custom component that makes it easier to capture multiple values from lab test results on mobile devices. You need to create the interface for the dataset in case the mobile devices lose connection to the network. Which method should you use?

Full set: 391 questions

Domain Extend the platform

Answer options
A: SaveData
B: updateView Correct answer
C: init
D: getClient
Correct Answer:
B. updateView
Explanation

In a model-driven app, a Power Apps component-framework (PCF) dataset control must redraw itself whenever the framework supplies data – whether the device is online or working from the mobile client’s offline cache. The framework performs that hand-off through the updateView(context) lifecycle method. updateView is called every time the dataset (and associated paging/selection metadata) changes, including when the user’s device has lost connectivity and the app is running in offline mode; therefore it is the correct place to render the interface that captures multiple lab-test values.

Why Incorrect

A. SaveData – Canvas-app function; not part of PCF or model-driven apps; cannot be used in a custom component.
C. init – Runs only once at control creation; does not receive refreshed dataset rows, so cannot handle offline updates.
D. getClient – Utility that returns client type (e.g., Web, Mobile); does not deliver dataset records or render UI.

References

1. Microsoft Docs, “Power Apps component framework – Dataset components (model-driven apps),” section “updateView,” states method is invoked when dataset changes and in offline mode. https://learn.microsoft.com/powerapps/developer/component-framework/dataset-controls#updateview

2. Microsoft Docs, “Support offline capabilities in Power Apps component framework controls,” paragraph “Framework calls,” confirms updateView is called with offline data. https://learn.microsoft.com/powerapps/developer/component-framework/offline-capabilities#framework-calls

3. Microsoft Docs, “SaveData, LoadData functions in canvas apps,” clarifies SaveData is available only in canvas apps, not PCF/model-driven. (Power Apps formula reference, SaveData)

4. Microsoft Docs, “init method (Power Apps component framework),” describes single initialisation call, no dataset refresh. https://learn.microsoft.com/powerapps/developer/component-framework/standard-control-interfaces#init

5. Microsoft Docs, “context.client.getClient() (Client API),” returns client type; unrelated to data rendering. https://learn.microsoft.com/power-apps/developer/model-driven-apps/clientapi/reference/context/client/getclient

Scroll to Top