Skip main navigation

Demonstration – Flow Concepts

.
16.9
I’m going to pick up where we left off in our last demo where I had created a button flow that creates an account based on the name that you input. I’m going to open that up in the designer. And, remember, this is a manually triggered flow that takes a name of the account and then it does a create record. And what I’m going to add is a couple of things on here. I’m going to add on here a action to go ahead and send me a notification if it creates OK.
47
I’m going to go ahead and also add a query in, a very simple query. Now, I could do this, turn on duplicate detection in the platform, but I want to do my own query to see if the count already exists. So I’m going to do a list record. I’m going to label this as default and accounts. And in the advanced options, I’m going to do a query. And we’ll explain more about the queries a little later in this module. And I want to check to see if that name– I’m going to do exact match for right now– is equal to the name that was created. And what I want to do is I want to do a condition.
80.1
So I’m to add a condition action. And what I’m going to do in this is I’m going to actually use an expression to check if that list of accounts returned any records. So I’m going to say if that’s empty. And then if it– it’s going to check against– so I’m using the dynamic panel to bind against the value from that list. And we’re going to check to see whether that is true, so, in other words, if the list is empty. And I’m going to go ahead and rename this because it’s always a good idea to rename some of these things. So I’m going to rename this as CheckIfAccountExists.
117.2
And notice that it created an if yes, so, in other words, if it is empty or if it’s not empty, but there’s no actions in them. I’ve already had my actions down here. What I want to do is I want to go ahead and move this into there. So I’m going to drag this up and drop it in there. I’m going to drag this one up also and that’ll connect those in. Now, what I want to do is if this works– in other words, if it creates the account, I want to send the notification. But if it fails, I want to let me know that it failed also.
145.7
So what I’m going to do is I’m going to add a parallel branch. And on this one I’m going to send another notification just to keep it simple. Create failed and then I’ll tell them what account name. And now in order for this to run when it fails, I need to go ahead and configure the run after. Otherwise, it will also run when it’s successful and I don’t want this to run when it’s successful. I wanted to run when it’s failed or when it’s timed out. And so now we’ve set that up. Now, just to have some fun, I want to go into this create record. Now you’ll notice that I can’t rename this one now.
181.4
I’ve missed my window and opportunity. So you always want to rename the step right away to give it the good name. But what I’m going to do is come down here and find a field that I can put some bad data in to cause this to fail. So we’re going to scroll down and we’re going to go to customer size value. This is normally something you’d pick from a list or bind it to another field. I’m going to enter a custom value. Now you notice if I do something really crazy like try to put my name in there, it’s going to tell me it needs to be an integer.
212
So it does do some basic checking, but it doesn’t know that 15,000 or 150,000 is not a valid value. So that should help us create a problem when we go to run this. Now I’m going to go ahead and save this. And let’s real quick go ahead and collapse some of these things so we can see things a little bit better. I’m going to collapse the list record. Notice if I collapse that all the way down so we’ll check if the account exists. We’re going to– if not– if no, then we’ll do nothing for right now. And let’s go ahead and run this.
241.2
Now before I can run this, I’m going to have to go ahead and activate because my flow is disabled right now. So what I’m going to do is go ahead and go over and re-enable my flow.
This demo takes you through the steps of adding queries to your existing flow.
Condition actions are added to check if any records are returned from the list chosen.
The demo also shows you how to rename steps and how to connect the steps together. It also shows you how to add a parallel branch that allows the flow to run when this process fails.
Watch the demo to understand how to use Microsoft Flow effectively.
This article is from the free online

Dynamics 365: Working with Power Platform Automation

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education

close