共用方式為


Advanced condition builder

Important

This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.

It's now easier than ever to write conditional logic in Microsoft Flow by using the new advanced condition builder. Previously, you could write complex conditions using expressions, but now it's possible to build conditions with the Microsoft Flow designer's simple point-and-click UI.

Add row

You can add a condition to your flow by selecting New step and then the first action available to you: Condition. There is a new Add button that you can select that presents two options:

  • Add row: Each individual condition you check for (such as the value is greater than 10, or the list does not contain Test) creates a new row in the condition builder.
  • Add group: You can combine one or more rows together in a group—each group is combined by either an And or an Or. If you select And, then all the rows must be true. If you select Or, then only one of the rows needs to be true.

Advanced condition builder

You can have however many rows or groups you need to build out your logic, and can continue adding rows (or groups) both at the top level of the condition, and inside groups using their Add buttons. If you want a simplified view of the condition, there is a button at the top-right of each group to collapse it.

Additionally, there is a ... menu at the right side of each row and group. This contains options for moving rows up or down (which can move them in and out of groups), and an option to Delete a row or group. Also, there are check boxes on the left side of each row or group. This allows you to select several different rows, and then select Group from the ... menu at the right to combine the rows into a single group.

Sometimes, there might be an expression that is more complex than what you want to model in even the advanced condition builder. Previously, you could select Edit in advanced mode and then enter the expressions in a text box. However, this old mode was difficult to work with because it did not give you access to IntelliSense for expressions or Dynamic content. There is no longer an Edit in advanced mode. Instead, if you want a very complex expression, you can use the regular Dynamic Content expression builder to enter your expression on the left side of the row. Then, select Equals to and enter true in the right side.

Complex expressions

The advanced condition builder is available for all new conditions that you add to your flows. It's not enabled for existing conditions, so if you want to use it with existing flows, add a new step and then drag the actions from the old condition to the new condition.