Power Automate: max function
Returns the highest value from numbers or arrays. Type mismatches break it silently.
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.
Returns the highest value from numbers or arrays. Type mismatches break it silently.
Returns the remainder of a division.
Returns days.hours:minutes:seconds between two dates as a string.
Returns the running Flow's name, ID, region, and run details at runtime.
Returns a random integer within a range. Negative numbers supported; no floats.
Parses an XML document to extract nodes, attributes, and counts. Input must be XML type.
Returns the query string from a URL. Empty when there are no parameters.
Returns the protocol from a URL: 'https', 'ftp', or any valid scheme.
Returns the full path and query string from a URL.
Returns just the path segment from a URL.
Returns the first day of any month.
Returns the exact start of an hour from a timestamp.