Integer. Data type of the variable.(Power Automate Cloud flows)

09/11/2023

Japanese version.

A variable is an element used in programming that is like a box in which data is named and stored,

They can store a variety of data with certain restrictions.

The ability to utilize variables makes a big difference in what you can do with Power Automate.

Variable type: Integers handle numbers with no decimal places.

(Float for numbers with a decimal point)

How to use

To use a variable, it must first be initialized. Without initialization, the variable will not be registered as a variable.

To do so, select the "Variable" connector under "Built-in" when adding a step to the flow.

Select "Initialize variable" from the "Actions" menu.

Specify the name and type of the variable.
Select "Integer" for the type.

The value is the content of the variable to be specified first.

Set value

Fixed value

To set a value to a variable, use the "Set variable" action in the "Variable" connector.

Increase or decrease in value.

Use the "Increase Variable" or "Decrease Variable" actions in the "Variables" connector.
This allows you to increase or decrease the value by a specified value.

In the same way as in the "Set Variable" action, the target variable and the value to be increased or decreased are set for both increasing and decreasing.

Set calculation results

Math functions can be used to set the results of four arithmetic operations and other operations to variables.

To do so, display the Dynamic Content window and specify the expression.

For example, if the expression is "add(1,6)" using the addition function, 1+6 will be calculated and 7 will be set to the variable.

It is available for both variable setting and increase/decrease actions.

See here for the integer part (quotient) and small part (remainder).

It is also possible to incorporate already existing variables into an expression. (You are more likely to use variables in expressions.)

To do so, select the variable from the dynamic content when setting up the expression, or Variables function with the name of the variable enclosed in parentheses '.

In the example below, "int1" (content 5) and 6 are set to the result of the mul function (multiplication) to "int2".

"int2" is set to the result, 30.

However, the target variable cannot be incorporated into the expression.

---

Links

Introduction(Power Automate Cloud flows)