In a previous blog series on getting some interactivity in your presentation, I already talked about the integration of Microsoft Forms, Power Automate and Power BI, you can read about that here:
In this new 2-part series I would like to show an example of how Power Apps, Power Automate and Power BI can work better together!
Let's start with the final goal in mind. Let's say for example, I want to have an interactive quiz during a presentation or workshop. An attendee will answer a question and be awarded points for the (partially) correct answer. I want to have a form/an app where I can enter the name of the attendee and the score after having received an answer.
Ideally I also want to show the results on the same screen so I don't have to switch between entering a score and showing the result.
In Part 1 of this blog series I already explained how to:
In this post I will explain how to:
Let me first acknowledge that Power Apps is not my primary focus, so if you see me doing things that you can do better stupid things, please let me know 🙂
So, I'll start off with just a basic Power App. All I need for that is 2 text input fields and a button to save the data. That button will be tied to a Run event from the Power Automate flow I created in part 1. You can follow along with the video below. There's nothing super special about these steps I think.
One thing to keep in mind however, is the parameters we used in the flow, because they will return in the App when I call the BetterTogether.Run event. So if I also added the Date field from the streaming dataset, I would have 3 parameters to fill in the Power App. Because I chose this to be the current time, I decided to fill it already in the flow, so I wouldn't have to bother in the Power App.
I would however like to add a few other features to the app that make it a little bit more fancy.
For that, I would like to:
I recorded everything in the video below, and I'll point out a few things that you have to pay attention to.
As I said earlier, Power Apps is certainly not my primary focus, and I even managed to create the basic app without looking up anything 🙂 But now my Google (or Bing/DuckDuckGo/any search engine) skills come in handy, because I don't know how to handle these (extended) cases.
The first turned out to be fairly easy, the Reset function can clear a control and return it to its original state. So I extend the code in the OnSelect for the Button with:
Reset(Name);
Reset(Score);
Now comes the tricky part, because I will need to have a variable (that either hides or shows the text box), to update the visibility of the text box.
After searching a while for a solution, I came across this post on the Power Apps Community forum. It involves declaring a variable (on the fly) and setting it to true (or false) with UpdateContext.
I needed to update the following parts of my app:
The only thing that didn't stuck at once was the fact that I had to reverse the IF-statement in the ScoreSaved label. Because variables have a default state of false, I had to set it to false to hide the label on initially opening the app.
Now that I have everything set up, I can finally glue it all together and create the Power BI report, embed the Power App, create a visual and publish it to the service.
And the best thing is: it's all integrated into the Power BI service where I don't have to switch to another page or refresh anything!
There's two things I'd like to mention here:
In this 2-part series I showed how to create a live dashboard and create a one-page app and dashbaord by using Power Apps, Power Automate and Power BI together.
Do you think you can come up with other use cases for this scenario? Please let me know in the comments if you have any!
For the past few months I have been using Power Apps and Power Automate more and more. And while I'm still most experienced with Power BI, I dare say I'm getting more proficient in the other products too. And I really think it's a good thing to use more of the Power Platform products.
Because they are all powerful alone, but just Better Together!