Lessons Learned from Advanced Expressions for MS Flow Session at Microsoft Business Applications Summit 2018

I didn’t actually attend the summit, but rather took advantage of the fact that Microsoft is generous enough to make all of the sessions available on-demand. The Advanced Expressions for MS Flow session, led by Stephen Siciliano, was chock-full of information on the various types of advanced expressions available in MS Flow, suggested uses for these different types, and real-world demos. Using advanced expressions can seriously kick up your MS Flow game, so I highly recommend becoming familiar with these gems.

Advanced expressions are function expressions that can be written in a compose action or inline in a conditional. When an advanced expression is written in a compose action, the result of the expression can then be used in other areas of your flow. On the other hand, if the expression is written in a conditional, the result of the expression will be used to determine to which path the flow will continue. In this case, the expression must begin with the @ character, and the expressions that can be used here include equals(), and(), or(), not(), less(), lessOrEquals(), greater(), and greaterOrEquals().

However, I may be getting ahead of myself. You may still be asking “Where do I find advanced expressions?” So, let me start there. Once you create an action, click on “Add dynamic content”, in the pop up, there are tabs for “Dynamic content” and “Expression”. Click on “Expression”. All of the advanced expressions are listed by type. They also include a short snippet description to assist you in determining what they do and how you might use them. It helps that most of their names are fairly descriptive as well.

The beauty of advanced expressions is they give you many more options for working with your data; and therefore, you can create flows that can do more for you. With advanced expressions you have the power to manipulate and generate data in the following ways:

Converting Data Types

  • MS Flow automatically converts some data types. For example, integers will automatically be converted to strings. What this means is that the data will be available both as an integer and as a string in the data content.
  • Other, less obvious, conversions can be written as an expression by the flow author. For example, if you need to convert a base64 encoded string to a string, you would use base64ToString(). There are advanced expressions for converting to string, floating point, integer, boolean, base64, Data URI, URI component, binary, array, JSON object, and XML content.


Working with Strings

  • There are expressions for joining two strings, concat(); extracting a chunk of a string, substring(); or replacing sections of a string, replace().
  • If you need to convert the case of a string, you can use toLower() and toUpper().
  • Finding the location of text in a string is easy with indexOf() and lastIndexOf().
  • Lastly, if you need to check if a string starts with or ends with a value, you can use startsWith() or endsWith().


Performing Arithmetic

  • Doing simple arithmetic, or even advanced arithmetic, can be achieved with the arithmetic expressions. These include:
    • add(), returns the result of adding two numbers
    • sub(), returns the result of subtracting two numbers
    • mul(), returns the result of multiplying two numbers
    • div(), returns the result of dividing two numbers
    • mod(), returns the remainder after dividing two numbers
  • Advanced arithmetic is possible, because you can use expressions within expressions. For example, if you want to complete a + b / c, your expression would be add(a, div(b,c)).
  • Min() and max() are expressions that return the minimum or maximum value from an array of numbers.


Manipulating Date/Time

  • There are a bunch of advanced expressions for manipulating date/time. These include, but are not limited to, expressions for:
    • Returning the current timestamp as a string, utcNow()
    • Adding times together, addMinutes(), addHours(), addDays(), etc
    • Converting time zones, convertTimeZone(), convertToUtc(), convertFromUtc()
    • Formatting date/time into a string, formatDateTime()
    • Returning a segment of time from a timestamp, dayOfWeek(), dayOfMonth(), etc.


Generating Data

  • The two most helpful examples of expressions that generate data are:
    • guid(), returns a globally unique string
    • rand(), which returns a random integer within the specified range


The if() expression can be helpful if you are simply trying to add styling or set a value based on a condition. You can write a simple if() expression rather than add an additional layer of conditions into the flow. Multiple layers of nested conditions can become confusing and can get short circuited if a missing property gets referenced.

Properties that are not set or return as null will cause your flow to fail. To avoid this, use the coalesce() function in conjunction with the ? character. The idea is to set a default value for the property that will be used if the property returns as null. This looks something like this: coalesce(body(‘Get_record’)?[‘content’], ‘Default Value’).

There are also some really cool advanced expressions for working with lists/arrays, and workflows. I encourage you to poke around in the Expression tab to see what else is available. In the session, Siciliano also briefly discussed asynchronous actions (using 2 triggers in the same flow), working with other flows (using the Flow Management Connector), and calling nested workflows (use this to break up larger flows into smaller chunks). As I stated earlier, this session was chock-full of information. It was well worth the time spent. I’d like to think my Flow game has been kicked up a notch as a result.



Time flies when you’re having fun and that means Ignite will be here before we know it.  As expected Microsoft has already started to lay the ground work for some of the talking points at Ignite with their feature and enhancement announcements in August and will likely continue that trend through September.

Office 365 Roadmap Transitioning to Microsoft 365 Roadmap

When Microsoft first rolled out the Microsoft 365 package (Office 365, Windows 10, and Enterprise Mobility & Security) there was a lot of confusion around what the differences were between Microsoft 365 and Office 365.  In fact, we still get questions about this regularly and with this latest change that trend is likely to tick upward.  In mid-September 2018 Microsoft will be moving the Office 365 Roadmap to a new location on the web and adding Microsoft 365 features.  Continue reading “WHAT’S NEW IN OFFICE 365 (SEPTEMBER 2018)”

WHAT’S NEW IN OFFICE 365 (August 2018)

With a little over 6 weeks to go until Ignite and the Business Application Summit last month we are sure to be getting some new features and enhancements galore over the next couple months.  As an FYI: Microsoft has made most of, if not all the Business Applications Summit sessions available on demand. If you’re thinking about how your organization can take advantage of the Microsoft Power Platform (Power BI, PowerApps, Flow and Dynamics 365) it’s worth looking through the sessions.

Continue reading “WHAT’S NEW IN OFFICE 365 (August 2018)”

MS Flow and Azure: Creating Parent and Sub sites

The Assignment

Recently we were asked by a client to develop a MS Flow that creates a sub site when users enter a new item into a SharePoint list. What we found was there’s no simple, out of the box way to have the new sub site inherit the top navigation of the parent site. As a result, we needed to create an Azure Function to preform this function.  Continue reading “MS Flow and Azure: Creating Parent and Sub sites”

What’s New In Office 365 (July 2018)

It’s been another busy month for Office 365 updates.  Many of the updates that rolled out Duane Odumwere ahead of schedule which can be nice for folks that were waiting on a specific update to implement a solution.  However, it’s nice when the Office 365 Roadmap is accurate😊.

Microsoft 365 Admin Center

This one’s been in the pipeline for some time but if you haven’t checked it out yet be prepared for some changes.  Content is still very similar so it’s not a terribly difficult adjustment but anything with Administration rights in Office 365 should get familiar with the new layout sooner rather than later at https://admin.microsoft.com. Continue reading “What’s New In Office 365 (July 2018)”

SharePoint Frameworks (SPFx) Impressions

Mike Berryman

With the push to move away from On-Premise SharePoint environments in favor of the Office 365 SharePoint environment, Microsoft has drastically changed the landscape of SharePoint development.  I’ve been a SharePoint developer since 2007 and making the jump to SharePoint Online has been the most jarring change yet.  Of course when SharePoint Online was first announced and as features have been introduced, I’ve played around with them in a strictly “Hello World” capacity, but as any developer will tell you, creating a “Hello World” project for play purposes is drastically different from actually creating a real-world-use project.

I recently got to create my first “real” SharePoint Framework Web Part and here are my thoughts, as someone coming from over 10 years of On-Premise SharePoint development.

Continue reading “SharePoint Frameworks (SPFx) Impressions”

SharePoint Conference 2018 Day 1 Recap

I was watching the SharePoint Conference North America 2018 Keynote (#SPC18 on Twitter) and I must admit, I “geeked out” a little bit about SharePoint Spaces and started to contemplate how I could convince the executive team to sign off on a Commercial Duane OdumHoloLens. If you are not familiar with SharePoint Spaces head over to the GeekWire article on SharePoint spaces by Nat Levy.  Essentially Microsoft is using Office 365/SharePoint Online to bring mixed reality creation to the masses.  The astute reader will notice that you don’t need the HoloLens but to you good reader, I say phooey…go big or go home.  If you or your organization want to get in on the private preview you can nominate your organization using the SharePoint Spaces Form (love that they are using MS Forms for this😊).  Continue reading “SharePoint Conference 2018 Day 1 Recap”