• Home
  • About Us
  • Contact Us
  • Privacy Policy
  • Special Offers
Business Intelligence Info
  • Business Intelligence
    • BI News and Info
    • Big Data
    • Mobile and Cloud
    • Self-Service BI
  • CRM
    • CRM News and Info
    • InfusionSoft
    • Microsoft Dynamics CRM
    • NetSuite
    • OnContact
    • Salesforce
    • Workbooks
  • Data Mining
    • Pentaho
    • Sisense
    • Tableau
    • TIBCO Spotfire
  • Data Warehousing
    • DWH News and Info
    • IBM DB2
    • Microsoft SQL Server
    • Oracle
    • Teradata
  • Predictive Analytics
    • FICO
    • KNIME
    • Mathematica
    • Matlab
    • Minitab
    • RapidMiner
    • Revolution
    • SAP
    • SAS/SPSS
  • Humor

And Operator in Flow

December 12, 2018   Microsoft Dynamics CRM
and operator flow 300x225 And Operator in Flow

We’ve devoted several blog posts in 2018 to Microsoft Flow because of its awesome ability to automate workflows quickly with a no-code/low-code approach. If you haven’t read our recent post on building Flows in mere minutes, please check it out – it’s worth your time!

Today’s post is devoted to Flow’s And operator, which enhances the automation potential of our workflows. In certain business scenarios, we want the action we take to be based on multiple checks – e.g., if condition A is true AND condition B is also true, then take subsequent action, otherwise take no action. To help illustrate this, let’s consider a real-world scenario.

Let’s say that we are operating a roofing company; one of our main tasks involves sending our technicians to inspect roofs for damage. As the technicians inspect the roof, they mark Yes or No to various questions in an inspection checklist on their mobile device. Next, let’s say that if, for example, they find water stains (condition A) AND they also find water leaks (condition B), we want to automatically send the customer an email suggesting that the best way to prevent potential future water-related problems is by installing smart sensors on their roof. Here’s how we can accomplish this with a Flow.

1. We will trigger our Flow when a record is created. In our case, we are creating an Inspection Check Lists record.

 And Operator in Flow1 And Operator in Flow

2. Next, we need a Condition. To create one, click New Step > Condition Control.

2 And Operator in Flow

 And Operator in FlowNow, in this case, we want to add two conditions. With Flow, multiple conditions are added in advanced mode in the form of a formula. Don’t be intimidated! Just because we’re going into advanced mode does not mean we’re doing anything especially technical or advanced – we’re simply tweaking the formula, which can only be done in this mode. The following steps provide an easy way to generate a formula for our And condition.

3. Let’s add the first condition: is our vr_waterleaks field equal to true? Here, we need some very simple code to define a true value: @equals(triggerBody()?[‘vr_waterleaks’], true).

 And Operator in Flow3 And Operator in Flow

4. As stated earlier, the way to hardcode multiple conditions is by clicking Edit in advanced mode. Once in advanced mode, copy the code from the previous condition (Step 3) without the “@”: @equals(triggerBody()?[‘vr_waterleaks’], true). You’ll need this in Step 7.

5. To add our second condition, we will go back to Edit in basic mode, clear the condition created in Step 3, and create the second condition: is our Water Staining field equal to true? Again, we need some very simple code: @equals(triggerBody()?[‘vr_waterstaining’], true).

 And Operator in Flow4 And Operator in Flow

6. Now we need to combine the two conditions. While still viewing the second condition, once again click on Edit in advanced mode. At the beginning of the code, add an And clause by typing “and(,” between “@” and “equals.” It should now look like the After column:

Before

After

@equals(triggerBody()?[‘vr_waterstaining’], true) @and(,equals(triggerBody()?[‘vr_waterstaining’], true)

7. Next, paste the code for the first condition (copied in Step 4) between “and(” and “,equals.” It should now look like After column:

Before

After

@and(,equals(triggerBody()?[‘vr_waterstaining’], true) @and(equals(triggerBody()?[‘vr_waterleaks’], true),equals(triggerBody()?[‘vr_waterstaining’], true)

8. Finally, add a close parenthesis – “)” – to the very end of the formula. It should now look like After column:

Before

After

@and(equals(triggerBody()?[‘vr_waterleaks’], true),equals(triggerBody()?[‘vr_waterstaining’], true) @and(equals(triggerBody()?[‘vr_waterleaks’], true),equals(triggerBody()?[‘vr_waterstaining’], true))

9. Hit <Save> and you’re all done creating an And clause that will take an action you define if and only if both conditions are met.

Hopefully, you can think of many uses for this Flow operator in your own organization. To learn more about Flow, please visit our website. If you’re interested in taking a Flow class, we offer two different PowerApps and Flow courses: one focuses on Model Apps and one on Canvas Apps.

Happy Flow’ing!

Let’s block ads! (Why?)

PowerObjects- Bringing Focus to Dynamics CRM

Flow, Operator
  • Recent Posts

    • WHEN IDEOLOGY TRUMPS TRUTH
    • New Customer Experience Needs and Commerce Trends for 2021
    • A data transformation problem in SQL and Scala: Dovetailing declarative solutions
    • George Wallace Joins Laverne Cox For Comedy Titled ‘Clean Slate’
    • How Microsoft Azure DevOps and Dynamics 365 CRM Work Together to Improve Service Responsiveness
  • Categories

  • Archives

    • February 2021
    • January 2021
    • December 2020
    • November 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • March 2020
    • February 2020
    • January 2020
    • December 2019
    • November 2019
    • October 2019
    • September 2019
    • August 2019
    • July 2019
    • June 2019
    • May 2019
    • April 2019
    • March 2019
    • February 2019
    • January 2019
    • December 2018
    • November 2018
    • October 2018
    • September 2018
    • August 2018
    • July 2018
    • June 2018
    • May 2018
    • April 2018
    • March 2018
    • February 2018
    • January 2018
    • December 2017
    • November 2017
    • October 2017
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • April 2017
    • March 2017
    • February 2017
    • January 2017
    • December 2016
    • November 2016
    • October 2016
    • September 2016
    • August 2016
    • July 2016
    • June 2016
    • May 2016
    • April 2016
    • March 2016
    • February 2016
    • January 2016
    • December 2015
    • November 2015
    • October 2015
    • September 2015
    • August 2015
    • July 2015
    • June 2015
    • May 2015
    • April 2015
    • March 2015
    • February 2015
    • January 2015
    • December 2014
    • November 2014
© 2021 Business Intelligence Info
Power BI Training | G Com Solutions Limited