exam questions

Exam PL-400 All Questions

View all questions & answers for the PL-400 exam

Exam PL-400 topic 3 question 3 discussion

Actual exam question from Microsoft's PL-400
Question #: 3
Topic #: 3
[All PL-400 Questions]

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?

  • A. SaveData
  • B. updateView
  • C. init
  • D. getClient
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Prakash4691
Highly Voted 4 years, 2 months ago
SaveData is wrong, which works only on canvas app. Offline capability from MDA in mobile, we need to create profile and enable some entities in case if mobile loses connectivity so that we still have access to those data. Init is to render the grid control and in update view we can write logic to render data in the grid. My answer would be updateview. reference link : Enable offline capability in MDA for mobile - https://knowledgefrommanish.com/powerapps/power-apps-mobile-app-mobile-offline-capability-for-model-driven-apps/
upvoted 32 times
Dean0918
4 years, 1 month ago
https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/control/updateview https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-savedata-loaddata
upvoted 2 times
Dean0918
4 years, 1 month ago
UpdateView is correct i think
upvoted 8 times
Yuro
4 years, 1 month ago
agree with dean
upvoted 2 times
...
...
...
PrincipalJoe
3 years, 2 months ago
Why is updateView correct?? This is a method called when a value has changed. so in this method you can implement your code but it does not handle itself when the user is offline. The SaveData function stores a collection for later use under a name. So you may implement SaveData in the updateView event method
upvoted 3 times
Net_IT
1 year, 8 months ago
updateView will be called when any value in the property bag has changed. This also includes global values such as offline status. Also, SaveData is for Canvas Apps.
upvoted 1 times
...
...
...
val_maly
Highly Voted 3 years, 11 months ago
"You are asked to create a custom component". So you need to use PCF and the only methods in PCF interface are init and updateView. Init is to initialize component, so I vote for updateView
upvoted 26 times
Juan0414
1 month, 1 week ago
Exactly
upvoted 1 times
...
fihemal249
3 years, 4 months ago
Most to the point answer to the question
upvoted 3 times
...
...
itmaxuser
Most Recent 4 days, 4 hours ago
Selected Answer: B
✅ The Correct Answer: B. updateView Here's why: In a PCF dataset component, updateView is called whenever the dataset changes. You can use updateView to render and cache data for offline usage. Combined with techniques like IndexedDB or localStorage (in JavaScript), updateView can help you store and update what the user sees even when offline.
upvoted 1 times
...
loftuscheek
1 month, 2 weeks ago
Selected Answer: B
custom component mean pcf not custom page(canvas app)
upvoted 1 times
...
KucaStonojka
4 months, 3 weeks ago
Selected Answer: A
The correct answer is A. SaveData. Explanation: The SaveData method is used in Power Apps to store data locally on a device, enabling offline functionality. This is particularly useful in scenarios where mobile devices may lose network connectivity, as it allows data to be saved locally and synchronized later when the device reconnects. Here’s how the methods relate: SaveData: Stores data locally for offline use. updateView: Updates the user interface when data changes (used in custom PCF components but not for offline storage). init: Initializes the component when it loads. getClient: Retrieves the client type (web, mobile, etc.), but it doesn’t handle offline data storage. Therefore, SaveData is the correct method to support offline capabilities.
upvoted 1 times
...
hai297
1 year ago
Selected Answer: B
PCF only have updateView and init. The init is quite not make sense. So I choose updateView
upvoted 1 times
...
At09
1 year, 6 months ago
Should be updateView
upvoted 1 times
...
jkaur
1 year, 8 months ago
Updateview
upvoted 1 times
...
emt2021
1 year, 10 months ago
SaveData is used for canvas app, thus can't be correct. https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/offline-apps
upvoted 2 times
...
BolDeFruits
2 years ago
Custom component can be a pcf , but can be a page app or a canvas apps. A is correct.
upvoted 2 times
...
DimpleG
2 years, 2 months ago
Selected Answer: A
A "SaveData" method typically allows to persist the data locally on the device, so it can be retrieved later even if the device loses connection to the network. This method is typically used in offline-capable apps to ensure that data is not lost even if the network connection is lost. In this case, since the requirement is to capture multiple values from lab test results on mobile devices, and to ensure that the data is not lost in case of network disconnection, using a "SaveData" method would be an appropriate solution. "UpdateView" is a method that is used to refresh or update the display of the user interface. It is typically used to reflect changes in the data or state of the app, such as changes made by the user or changes received from a server. In this case, "UpdateView" would not be an appropriate method for ensuring that the data is saved in case the mobile device loses connection to the network.
upvoted 3 times
...
Fyrus
2 years, 4 months ago
Selected Answer: B
based on comments it's clear that A is not sure
upvoted 1 times
...
pkatsa
2 years, 10 months ago
Selected Answer: B
in exams 24/5 . savedata was not an option anymore
upvoted 11 times
...
jkaur
3 years, 1 month ago
UpdateView
upvoted 2 times
...
BunkMoreland
3 years, 7 months ago
Can we not create the canvas app as the interface and then use SaveData ? Then embed it as a custom control in the model driven app ? This is the most 'low-code' way of implementing it as opposed to using PCF
upvoted 3 times
...
captainkirk
3 years, 9 months ago
I would go with SaveData... you are asked to create the custom component for mobile devices...and design an interface. wouldnt this be a canvas-app? the question only says that the company use a model-driven app.
upvoted 7 times
sallo
3 years, 9 months ago
totally agree with you
upvoted 3 times
...
...
reivaxmik
3 years, 11 months ago
but you can embed a canvas app into MDA that might have that custom component for offline. so savedata might still be an answer?
upvoted 1 times
reivaxmik
3 years, 11 months ago
UpdateView is the answer This method will be called when any value in the property bag has changed. This includes field values, data-sets, global values such as container height and width, offline status, component metadata values such as label, visible, etc.
upvoted 4 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago