Flows, logic, and algorithms are other important capabilities of SAP Build Apps. Logic guides the flow of how an app behaves when a user interacts with it, and algorithms run the math that powers it. To better understand the logic, let's look into functions in more detail. Functions occur in almost all applications and are particularly useful for solving tasks and problems. When an event occurs, a function initiates an operation in which one or more inputs are processed, and an output is returned.
Logic is fundamentally based on business rules that are set to produce an outcome, and the requirements for those should be well understood during the planning process. Business rules are the specific ways of operating that arise from your business and are closely related to software requirements.
Consider an example where a person’s height and weight values are entered, and then the BMI value is calculated and returned. The BMI value is then passed on and appears in an info window. This creates SAP Build Apps without writing a single line of code and distinguishes between the two different types of functions, which, as in this example, can be used together to create a complete app logic:
- Flow Functions
A flow function can be found in the Logic tab with different categories. They can be used to perform actions that can be visually placed and combined in a sequence. For example, flow functions can store and retrieve data or activate hardware components. You can use input and output nodes to connect logic flow functions.
- Formula Functions
The task of form functions is to process data so that you can, for example, filter and sort texts, edit values with operators and mathematical formulas, or obtain information from the sensors of the device and then give it to the output. It uses a powerful library with over 500 finished formulas to do this.
The potential of the Logic app arises in particular from the combination of flow and form functions, which means that SAP Build Apps can use simple to complex logic with countless application options. While working with logic flows, events acquire an important meaning. These are necessary so that logic can be triggered in the first place. Defining the logic of your application is about applying all the rules and requirements to make the app work accordingly, and is one of the longer and more involved aspects of the application development process.