Power Automate: trim function
Removes leading and trailing spaces. Inner spaces stay intact.
Power Automate expressions are where a lot of the real magic happens, and this is my reference for the functions that power them. When the point-and-click designer runs out of road, a well-placed expression gets you exactly what you need. I document the everyday date and time helpers like the "addDays" function, the "addHours" function, and the "addMinutes" function, along with the more flexible "addToTime" function for shifting timestamps. I cover math with the "add" function, logic with the "and" function, and data shaping with the "addProperty" function and the "array" function. Need to convert data types? The "base64ToBinary" function gets its own walkthrough, and the "action" and "actions" functions let you reach into earlier steps. Every entry gives you the syntax, the parameters, the return value, a practical example, and the edge cases that catch people out.
Removes leading and trailing spaces. Inner spaces stay intact.
Builds an array from mixed types: strings, booleans, integers, and nested arrays.
Combines strings, booleans, integers, and arrays into a single string.
Wraps a single value into an array. Accepts strings, booleans, integers, and floats.
Divides two numbers. Has a 19-digit precision limit that silently corrupts large results.
Multiplies two numbers. Has a 19-digit precision limit that silently corrupts large results.
Sums two numbers. Has a 19-digit precision limit that silently corrupts large results.
Subtracts two numbers. Has a 19-digit precision limit that silently corrupts large results.
Returns the size of a string or the number of elements in an array.
Returns the position of text within a string. Zero-based; -1 when not found.
Extracts part of a string using a start index and length. Zero-based; errors if the range overflows.
Replaces every instance of a substring within a string. Case-sensitive; strings only.