exam questions

Exam MB-400 All Questions

View all questions & answers for the MB-400 exam

Exam MB-400 topic 2 question 11 discussion

Actual exam question from Microsoft's MB-400
Question #: 11
Topic #: 2
[All MB-400 Questions]

HOTSPOT -
You are developing an app for a sales team to record contact details in their Common Data Service (CDS) database.
The app must handle loss of network and save the data to CDS when reconnected.
The main screen of the app has a form to collect contact data and a button. The OnSelect property for the button has the following expression:

For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: Yes -
LoadData and SaveData combine to form a simple mechanism to store small amounts of data on a local device. By using these functions, you can add simple offline capabilities to your app.

Box 2: No -

Box 3: No -

Box 4: Yes -
Reference:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/offline-apps

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
sanharshu7
Highly Voted 4 years, 10 months ago
function "Path" is typo mistake here its "Patch" function to create records with Default. https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch I interpret the code... If Online Creates new record in CDS contact entity Navigate to "ConfirmationScreen" Else //Offline Overwrites latest record to Collection and save to device memory Navigate to "PendingScreen" Yes -- It creates a record in CDS with fresh data but yes not saving from the collection (agree with RobinS..) No -- the collection is clear and save single record when goes offline No -- Existing contacts are not updated in the code Yes -- Yes it handles the connection loss
upvoted 15 times
...
gno
Highly Voted 4 years, 10 months ago
for me it's no-no-no-yes. this code either creates a new record when online or overwrites the offline record collection with the latest entry
upvoted 5 times
...
cvocvocvo
Most Recent 4 years, 4 months ago
"SaveData stores small amounts of data on a local device. By using these functions, you can add simple offline capabilities to your app." So because SaveData is used, it will save the record when reconnected. So the 1st one is Yes.
upvoted 1 times
RandomUser
4 years, 4 months ago
LMFAO. It is *not* writing back updates stored locally. If you want to know how this would be done check here: https://jobs.collab365.community/powerapps-offline-disconnected-mode/ Steps to sync Offline Changes If (Connection.Connected && CountRows(LocalChanges) > 0, … – If we are connected and we have at least 1 record to sync back. ForAll(LocalChanges, – Iterate through every pending change in the “LocalChanges” collection. If (ChangeType = “u” – We only want to process updates (not deletes) at this stage. Patch(Issues, First(Issues), { … } – As we are connected to we want to create a record in the “Issues” data source, using the first Issue record (matching the IssueId) and a change record supplied by values from the UI (as JSON). If (ChangeType = “a” – We only want to process new records. Patch(Issues, Defaults(Issues), { … } – As we are connected to we want to create a record in the “Issues” data source, using a default issue record and a change record supplied by values from the UI (as JSON).
upvoted 1 times
...
...
jkaur
4 years, 4 months ago
The given answer is correct
upvoted 1 times
...
Druey
4 years, 7 months ago
For me the first is NO. It asks if the expression saves data when the connection is on again. First of all, when we are on line again, we are in another screen because of the navigate function. Second: even if we were in the right screen, it would not save anything if we don't push the button again Third: even if we are on the right screen and we push the button, we would not save the right data, but only the new ones in the form So I would say no.
upvoted 1 times
...
RominaT
4 years, 7 months ago
For me, first is NO. It does not say there is a code to generate data in "OnStart".
upvoted 1 times
...
hdjd333
4 years, 10 months ago
The code does not save the data to CDS when the device reconnects to Internet. There is no code to loop through the saved cache data and post it to CDS. The function "Path" is a typo, it should be Patch. When it uses with Defaults function, it create a new Contact record in CDS.
upvoted 3 times
RobinS
4 years, 10 months ago
I think the statement about saving data when reconnected means new data. If the device is again online, it will take the path of 'connected' and new data entered will be again updated to CDS. What it does not do is push all the local data in cache to CDS or deal with conflict with those updates.
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