Truncate the decimal part of a number
Power Automate Desktop offers a wide range of actions for retrieving data from web pages and on-premises software.
In many cases, you can search for an action and do what you want just by dragging and dropping it.
However, when you want to reshape the data you’ve retrieved, you may often find that the actions don’t quite do what you need.
This article explains how to get a value with the decimal part truncated from a number retrieved from a web page or a specific on-premises program.
Implement by copying and pasting
Section titled “Implement by copying and pasting”Copy the following code and paste it into the Power Automate Desktop flow designer to add the action.
Variables.TruncateNumber.GetIntegerPart Number: 10.52 Result=> TruncatedValueImplement in Power Automate Desktop
Section titled “Implement in Power Automate Desktop”- In “Search actions”, type “Truncate number”.
- Enter the target number (10.52 in this case) in “Number to truncate”, and set “Operation” to “Get integer part” (this is also the default).
- When you run the flow, the value with the decimal part truncated (10 in this case) is stored in the variable
TruncatedValue.