The views and opinions expressed in this blog are those solely of the author(s) and do not necessarily reflect Microsoft’s current policy, position, or branding. For official announcements and guidance on Dynamics 365 apps and services, please visit the Microsoft Dynamics 365 Blog.
Personalized Community is here!
Quickly customize your community to find the content you seek.
Check out the latest features available in Dynamics 365 for Customer Engagement, including LinkedIn Connect, Voice of the Customer and Universal Resource Scheduling.
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Talent TechTalks
I was asked to create a tech demo in work recently that could show off some of the capabilities of Power Apps and Power Automate, and I figured this would be a perfect opportunity to use the Flic button I got from Matt Beard of Data8 when I attended the User Group Summit in Amsterdam earlier this year .
Anyone who’s worked in an office will undoubtedly have experienced the fun of a fire drill (usually on a day where it is cold and miserable). I thought it would be a great demonstration of the Power Platform if we could create a system to record when a fire evacuation has occurred in one of our offices so we could notify the other offices, and to send notifications when the evacuation was over.
The first thing to do was create a new Evacuations entity in CDS where I wanted to record the following:
It would be really simple to manually record the evacuations in here, but where’s the fun in that? I had the Flic buttons at my disposal, and I was going to use them!
For those of you who are not aware, Flic buttons have three trigger events:
Each of these triggers can be mapped to a specific action, but the exciting part for us #PowerAddicts is that you can use them to trigger a Flow.
For the purposes of this tech demo, I wanted to have two flows:
I created an Instant Flow that is triggered “When a Flic is Pressed”:
As you can see from the screenshot above, there are two options on this trigger. First you select the Flic Button you’ll be associating with the Flow, then you select one of the available Events; I’m going to be using a “Click” event for this Flow.
When you use a Flic trigger, it returns the Click Time in the following format:
This isn’t particularly presentable, so I’ve added a Compose step to format the Date using the following expression:
formatDateTime(triggerBody()?['clicked_at'], 'dd MMMM yyyy')
This compose step formats the Click Time above as “12 November 2019“, and I’m going to use this when I create the record in CDS
The last step in the Flow is to use the Send an Email (V2) action to send an email to everyone in my organisation to let them know our office has been evacuated
And that’s it, we have a simple Flow configured run on clicking a Flic button to create a record in CDS when an evacuation is happening and to notify all employees in our organisation. The next step is to create a Flow to close the evacuation record when everyone returns to the office
For this Flow, I’m using the Same “When a Flic is Pressed” trigger as above, but this time I’m going to use the Double Click event. For this Flow I want to retrieve the Active Evacuation records for this office and set them to Inactive, recording the time that the Evacuation was ended.
If you want to find out an easy way to generate OData queries to use in the List Records step, then I’d recommend reading Sara Lagerquist’s recent blog on this topic
Once the Evacuation records are closed, I use the Send an Email (V2) action again to send an update email to all employees to tell them that the Evacuation of the office is now over.
This is a relatively simple use case for using Flic buttons but it shows the power of combining IoT devices with the Power Platform and it reinforces my belief that “no UI is the best UI”. Through two actions we have a complete record in our database, and it’s required no input from the User other than a Click and a Double Click
In part 2 of this blog, I’ll show how I created a canvas app for reviewing and monitoring Evacuations, and how to use the location data so the button knows which office has been evacuated.
Business Applications communities