Digitalize raffle experiences with Microsoft Power Platform
By: Ivan Ho
Tags: Fundraising, Microsoft Power Automate, Software Development, Microsoft Power Apps, Microsoft Power Platform

I read a lot of great things about the Microsoft Power Platform last year. But I haven’t had a chance to try it out until recently. Please join me with my journey with the Power Platform. The organization that I works for, has been organizing fundraising and volunteering events for a the Boys and Girls Club for many years. However, it has been challenging with pandemic this year. We have to be creative and virtualize most of the events. One of our biggest fundraising event is the annual raffle. Since most of the employees has been working from home and would not be able be participate in person. We need to come up a solution to automate the whole raffle process, from selling tickets, listing prizes and raffle draw. There are existing solutions in the market but they are not the most cost effective.

Challenges

Security and authentication are the most important and time consuming piece in a new application setup. My organization has already migrated to Azure Active Directory and every employee has a power apps license, PowerApps basically take care of authentication. All users have to do is download the Power Apps from app store and login with their organization credential.

are the most important and time consuming piece in a new application setup. My organization has already migrated to Azure Active Directory and every employee has a power apps license, PowerApps basically take care of authentication. All users have to do is download the Power Apps from app store and login with their organization credential. Easy to get started — The Power Apps studio provides a rapid application development environment to build custom apps for your business needs. Once you connect to your data source, you can drag and drop UI components and wire them up with your data source and in no-time you have a basic modern mobile app running. PowerApps are not a replacement for custom coded application which has dependency on the JavaScript, CSS and other html components. You can write formulas to describe your logic. PowerApps formulas were very similar to Excel formulas which would allow business users the ease of creating formulas.

— The Power Apps studio provides a rapid application development environment to build custom apps for your business needs. Once you connect to your data source, you can drag and drop UI components and wire them up with your data source and in no-time you have a basic modern mobile app running. PowerApps are not a replacement for custom coded application which has dependency on the JavaScript, CSS and other html components. You can write formulas to describe your logic. PowerApps formulas were very similar to Excel formulas which would allow business users the ease of creating formulas. Deployment and distribution — PowerApps takes the guesswork out of how you’ll share your finished app with the your organization. There is no app store approval process and wait time. You can push an update anytime. It makes publishing your app incredibly simple and creates apps that work across android and iOS devices.

I took on the challenge to build a simple canvas apps in Power Apps for our organization. I came up with the following design and system flow.

The user can browses and purchase tickets for raffle items on a Power Apps. Each transaction is saved to a SharePoint list. We try to mimic to the real raffle experiences where the user will have a physical ticket with ticket number on it. Each new transaction will trigger a Power Automate flow which will create the number of individual tickets in another SharePoint list. The same flow will also send out team and app notifications for confirmation. Another Power Apps for the administrator will be created as well for the actual raffle draw. to pick winner for each item. The payment component is out of the scope and we use another website to handle collecting payment.

SharePoint List as Data sources

The Power platform has a list of data connectors available.(https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections-list). Since the app do not anticipate high volume of transaction, it is the most convenience for me to use SharePoint list for storing raffle items, transactions and ticket information. Keep in mind, your app users will need access to the SharePoint list as well. I create a group with view only and no edit permission in the SharePoint site for the app users.

SharePoint is no relational database. Every SharePoint list has a auto increment ID (integer) column as primary key by default. We can maintain a parent-child relationship by saving the primary key as foreign key in the child table.

Build the app in action

Once I got the SharePoint List created and populated with some sample data, I drew up a few screen layout and design. I took that to PowerApps Studio and built out the screens. There are a lot of great online documentation and YouTube video (PowerApps911 from Shane Young and April Dunnam channel are some of the best). It’s really easy for someone to learn about all the various controls.

Power Apps Studio

Normally, for any web application, we would have to build data access layer and various classes, and then set up hosting environment before we can test the application. But with PowerApps, it was as simple as pointing to SharePoint with my credentials. Next I can hooked up the controls with the right data. In 30 minutes, I have a usable app that I can deploy and share with anyone in the organization without any headaches. It is as easy as “right click” and share. I am able to act on user feedback faster and iterate rapidly.