While preparing for the PL-100 Microsoft Power Platform App Maker exam, understanding the different options for implementing business logic becomes pertinent. Business logic refers to the rules or procedures that dictate how business operates. It could be related to calculations, data manipulation, and other complex rules specific to a business. Implementing these rules in the app can help streamline business processes. There are numerous options available for implementing business logic in Power Apps, which we will try to explain below.
1. Canvas Apps Formula:
Canvas Apps provide direct user interaction with business data through a medium that can be designed as required. The Canvas App formula-way is code-heavy and involves intricate scripting. Consequently, developers aiming to harness Power Apps should familiarize themselves with front-end technologies. For example, the formula ‘If’ can be used to perform actions based on conditions.
If (Slider1.Value > 60, “Green”, “Red”)
In this example, if the value of Slider1 is greater than 60, the formula will return “Green”; otherwise, ‘Red’.
2. Model-driven Business Rules:
Model-driven business rules allow you to apply logic without writing code. These rules are created on the entity level and are enforced by the server, regardless of where the data is entered. Model-driven business rules come into play when you prefer a no-code option for executing business logic across the full spectrum of your data model.
For example, you can define a rule that when a value in Field 1 is less than 100, Field 2 is no longer editable.
In addition, model-driven business rules have two types, which are:
- Business Rule: This type is used when we need to perform a simple action like setting field values, setting visibility of a field or section, and setting requirements levels on a form.
- Business Process Flow: This is used when we have a longer business process that involves stages and steps.
3. Power Automate:
Power Automate (formerly known as Microsoft Flow) offers a powerful, serverless logic implementation tool that can manage both simple as well as complex business logic procedures involving multiple steps, loop-backs, and condition branches. Power Automate is primarily advantageous for event-driven logic, time-dependent procedures, and those requiring higher integration with various systems.
For instance, if when an item in SharePoint is modified, and you want to update the corresponding data in your PowerApps, Power Automate is well-suited for this workflow-based operation.
4. Plug-ins/WFs:
These server-side options are code-heavy and are ideal for executing complex operations that cannot be achieved by Power Automate or business rules. Developing plug-ins requires in-depth knowledge of the .NET framework, particularly C#. Your programming logic can sit within these plugins or workflows and seamlessly integrate into your app.
For example, if you need to perform complex calculations, validation, or integration logic triggers upon a certain event in the system, plugins would be ideally suited.
As recognized, the implementation method for business logic largely depends on the complexity of the logic, the requirement for client-side or server-side execution, and the level of coding your team can handle. It is helpful to balance between code-light and code-heavy options for the most effective and efficient use of the Power Platform. Summarized below are key differences and similarities for consideration.
Option | Coding Requirement | Execution Level |
---|---|---|
Canvas Apps Formula | High | Client-side |
Model-driven Business rules | None | Server-side |
Power Automate | Minimal | Server-side |
Plugins/WFs | High | Server-side |
Practice Test
True/False: Business rules can be used to implement business logic in PowerApps.
- True
- False
Answer: True
Explanation: Business rules in PowerApps allow simple business logic to be implemented without the help of a developer.
Which of the following are options for implementing business logic in PowerApps?
- A) JavaScript
- B) Business Rules
- C) Power Automate
- D) C#
Answer: B and C
Explanation: In PowerApps, business logic can be implemented using Business Rules and Power Automate. Coding languages like JavaSript and C# are outside the scope of PowerApps.
True/False: Power Automate cannot be used to implement business logic in Microsoft Power Platform.
- True
- False
Answer: False
Explanation: Power Automate is a service in the Microsoft Power Platform which can be used to create automated workflows between apps and services.
Which of the following can be used to extend business logic beyond PowerApps?
- A) Business rules
- B) Power BI
- C) Power Automate
- D) JavaScript
Answer: C
Explanation: Power Automate can integrate with other services and could be used to extend business logic beyond PowerApps.
Single select: Which of the following cannot be used to implement business logic in PowerApps?
- A) Power Automate
- B) Power BI
- C) Business Rules
Answer: B
Explanation: While Power BI can be used for data visualization and analysis, it is not typically used for implementing business logic.
True/False: You can implement business logic in PowerApps without writing code.
- True
- False
Answer: True
Explanation: Business logic can be implemented in PowerApps using the design interface, with features like business rules and Power Automate.
Multiple select: Which options are valid for creating reusable business logic across PowerApps solutions?
- A) Custom connectors
- B) Power Automate flows
- C) Business Rules
- D) Power Queries
Answer: A, B and C
Explanation: Custom connectors, Power Automate flows, and Business Rules can be used to create reusable business logic. Power Queries are used for data transformations.
True/False: Power Automate is only used for linking different applications and cannot be used for business rule implementation.
- True
- False
Answer: False
Explanation: Power Automate is not just for linking different applications. It can also contain complex business logic.
Single select: Which language is used for advanced business logic in PowerApps?
- A) JavaScript
- B) Power Fx
- C) C#
Answer: B
Explanation: Power Fx is a low-code language for expressing logic in Power Apps.
True/False: In PowerApps, business rules work only for Model-driven apps.
- True
- False
Answer: True
Explanation: Business rules in PowerApps are scoped to either the entity or the Model-driven app.
Interview Questions
What is business logic in the context of Microsoft Power Platform App Maker?
Business logic in the context of Microsoft Power Platform App Maker refers to the customized rules, workflows and actions that define the specific behavior and data manipulation within an application.
What are some of the ways that we can implement business logic in Microsoft Power Platform applications?
The ways include: using Power Apps canvas apps for creating interactive forms, using Power Automate for creating automated workflows, using Power Virtual Agents for creating conversational bots, and using Power BI for creating business data analytics insights.
How can Power Apps be employed in implementing business logic?
Power Apps can implement business logic by creating interactive forms and applications that drive based on defined rules and actions. It can also extract and manipulate data from various data sources, allowing creators to design a customized and user-friendly interface for business users.
What role does Power Automate play in establishing business logic?
Power Automate can be used to create automated workflows between your apps and services to get notifications, synchronize files, collect data, and more. These workflows can help apply business logic by automating business processes and decision-making operations.
How can Power Virtual Agents assist in implementing business logic?
Power Virtual Agents can implement business logic by engaging in interactive, automated conversations with end users. They can be programmed to provide dynamic responses based on the business processes and decision-making guidelines set by the organization.
How does Power BI implement business logic?
Power BI helps implement business logic by providing insights from business data through analytics. These insights can be used to drive informed decision-making processes and establish data-driven business rules.
What is the function of connectors in Power Platform in relation to business logic?
Connectors in Power Platform are APIs that provide a way for business logic to interact with data across different services. They enable interaction between the application and its data sources, allowing for implementation of business logic through data manipulation and transformation.
How can business logic be executed in Power Apps?
Business logic can be executed in Power Apps through the use of formulas. These formulas can control the behavior of controls within an app and can manipulate the data that these controls interact with.
What is the role of triggers in Power Automate?
Triggers in Power Automate start the execution of a flow in response to specific events, helping to implement business logic by starting processes based on predefined rules.
What are user interfaces in the context of the Power Platform, and how do they implement business logic?
User interfaces in the Power Platform typically refer to the canvases, forms and portals designed in Power Apps, or the chat interfaces in Power Virtual Agents. They implement business logic by enabling user interaction based on business rules — for example, displaying certain forms based on user roles, or providing response options in a bot conversation based on the user’s previous inputs.