PL-400 · Question #415
You are developing a canvas app that connects to Microsoft Dataverse. You add the Accounts table as a data source to the app. You implement a gallery that will display information from the Accounts…
The correct answer is C. Filter(Sort(Accounts, 'Account Name', SortOrder.Descending), IsBlank('Account Name') = false). Option C is correct because it queries directly from Accounts - the live Dataverse data source - rather than collAccounts, the local collection that may be stale or incomplete, which is the root cause of users seeing fewer rows than expected. It also wraps the query in…
Question
Exhibit
Options
- ASort(Accounts, 'Account Name', SortOrder.Descending)
- BSort(collAccounts, 'Account Name', SortOrder.Descending)
- CFilter(Sort(Accounts, 'Account Name', SortOrder.Descending), IsBlank('Account Name') = false)
- DcollAccounts
How the community answered
(53 responses)- A4% (2)
- B15% (8)
- C75% (40)
- D6% (3)
Explanation
Option C is correct because it queries directly from Accounts - the live Dataverse data source - rather than collAccounts, the local collection that may be stale or incomplete, which is the root cause of users seeing fewer rows than expected. It also wraps the query in Filter(..., IsBlank('Account Name') = false) to satisfy the requirement that only accounts with a name value are displayed.
Why the distractors fail:
- A queries the correct live source and sorts, but omits the blank-name filter, so nameless accounts would still appear.
- B sorts
collAccounts(the local cache), which is the very thing causing the missing-rows bug, and also skips the blank-name filter. - D returns
collAccountsraw - no sort, no filter, and still the stale cache problem.
Memory tip: "Cache = stale, Source = fresh." Whenever users report missing rows, suspect a local collection; switch to the direct data source and wrap in Filter to enforce any "must have a value" rules.
Topics
Community Discussion
No community discussion yet for this question.
