PL 400 Power Apps Development 4 — Questions and Answers
Question 1: In a canvas app, which function should you use to display a brief, non-blocking notification message to the user?
- Notify("Message", NotificationType.Success) (Correct answer)
- Alert("Message")
- ShowDialog("Message")
- Set(varMessage, "Message")
Correct answer: Notify("Message", NotificationType.Success)
Notify() displays a banner notification at the top of the screen without interrupting the user, supporting types like Success, Error, Warning, and Information.
Question 2: Which Dataverse feature lets you automatically calculate a column's value based on other columns without writing code?
- Calculated column
- Rollup column
- Choice column
- Formula column using Power Fx (Correct answer)
Correct answer: Formula column using Power Fx
Formula columns in Dataverse use Power Fx expressions evaluated server-side to derive a column's value from other row data without custom code.
Question 3: A model-driven app command bar button should only appear when a single row is selected in a grid. Which visibility rule setting achieves this?
- Selection count equals 1 in the command's visibility rule (Correct answer)
- Add a JavaScript handler that checks grid selection
- Set the button's enabled rule to 'Always'
- Configure the ribbon XML with EnableRule='Entity'
Correct answer: Selection count equals 1 in the command's visibility rule
Command bar visibility rules can include selection-count conditions, showing the button only when exactly one row is selected in the grid.
Question 4: You need a canvas app to read data from an on-premises SQL Server database. What is required?
- On-premises data gateway installed and configured (Correct answer)
- Direct SQL connector with public IP whitelisting only
- A Power Automate flow using HTTP to query SQL
- Azure SQL Managed Instance with VNet peering
Correct answer: On-premises data gateway installed and configured
The on-premises data gateway acts as a bridge between Power Platform cloud services and data sources inside a private network like on-premises SQL Server.
Question 5: In PCF development, which command initializes a new control project with the field template?
- pac pcf init --namespace MyNS --name MyControl --template field (Correct answer)
- npm init pcf-project --type field
- pac solution add-reference --path ./MyControl
- pac pcf push --force
Correct answer: pac pcf init --namespace MyNS --name MyControl --template field
The 'pac pcf init' command with the --template field flag scaffolds a new PCF field control project with the required manifest and TypeScript files.
Question 6: Which Power Apps expression correctly increments a counter variable by 1 each time a button is pressed?
- Set(varCounter, varCounter + 1) (Correct answer)
- Increment(varCounter, 1)
- varCounter++
- UpdateContext({varCounter: varCounter + 1})
Correct answer: Set(varCounter, varCounter + 1)
Set() updates a global variable's value, and using Set(varCounter, varCounter + 1) reads the current value and assigns the incremented result.
Question 7: You want to use environment variables in a canvas app to store a configuration URL that differs between dev and production environments. Where do you define environment variables?
- In the solution as an environment variable definition and value component (Correct answer)
- In the canvas app's App.OnStart using Set()
- In the Power Platform admin center under Settings
- In the .env file included with the app package
Correct answer: In the solution as an environment variable definition and value component
Environment variables are solution components with a definition and optional value; each environment can supply its own value without modifying the app itself.
In a canvas app, which function should you use to display a brief, non-blocking notification message to the user?