Skip to main content

Command Palette

Search for a command to run...

Working with numbers in Power Automate Desktop

A few things to know when using integers in Power Automate Desktop - PAD

Updated
1 min read
Working with numbers in Power Automate Desktop
M

I am an RPA-developer from Denmark.

I have a non-technical background but have taught myself web development working with RPA-tools for the past two years.

In the past I've worked with KofaxRPA and UiPath but am now working with Microsoft Power Automate and RoboCorp.

I recently discovered a way to use numbers in PAD without the variable being a Numeric value.

Set variable with numeric value as a text value

PAD will automatically detect if a variable is a string or an integer (it designate integers as "Numeric value." It is a bit annoying that PAD makes this decision for you, but there is a workaround.

So, if you only put in a number, the variable will be a Numeric value:

image.png

image.png image.png

In most programming languages, you can make an integer into a string, or a Text value, by putting quotes around it.

image.png

However, this does not give us the desired result:

image.png

Instead, in PAD, you must also put percentage marks around the quotes:

image.png

This allows us to input a number as a string (Text value) in PAD:

image.png

A use-case for this might be if you are inputting numbers in Excel and you want to make sure, that Excel does not convert it to numbers or dates. An example can be a reference number that may begin with the number zero. If excel reads the input as a number, it will automatically delete any zeros from the beginning.