Skip to Content

PL-400: Which Power Fx Expression Ensures Conditional Visibility for Command Buttons in Dataverse?

How to Control Command Button Visibility in Model-Driven Apps Using Power Fx?

Table of Contents

Question

You create a model-driven app by using the modern app designer.

You need to add a command button to the command bar. The command button must only be visible if one or more records are selected in a grid view.

Which expression should you use to control the visibility of the command button?

Select only one answer.

A. CountRows(Self.Selected.AllItems) > 0
B. CountRows(Selected.Items) > 0
C. Count(Self.Selected.AllItems) > 0
D. Count(Selected.Items) > 0

Answer

A. CountRows(Self.Selected.AllItems) > 0

Explanation

This item tests the candidate’s knowledge of using command button function.

The correct formula is CountRows(Self.Selected.AllItems) > 0. The expression CountRows(Selected.Items) > 0 is missing the Self element. You must use CountRows and not Count to meet the requirements.

Microsoft Power Platform Developer PL-400 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft Power Platform Developer PL-400 exam and earn Microsoft Power Platform Developer PL-400 certification.