Performing basic mathematical operations
Mathematical operations are very common, and it is reassuring to know that you can calculate these as part of the logic app run. These are commonly used in virtually every flow, function, or logic app I write. To calculate mathematical operations, do this:
- Initialize your variables (such as
a
andb
). In this exercise, we will seta
as10
andb
as3
. - Create an output variable to store your answer or create a Compose action for the same purpose.
- Create a Set variable action or use the Compose action and add the formula to its action field.
What you cannot do is this:
This produces 10/3
as a text string.
There are a series of built-in functions for mathematical operations that take the following structure:
Function method ( variable 1, variable 2)
Let's now discuss some common mathematical functions.