Your cart is currently empty!
Category: PowerApps
-
Model-driven apps in PowerApps: Components
Welcome to the fourth article in the model-driven app series! Today we will look at the Components in a model-driven app. This series includes six articles that will help you to get to know and use model-driven apps and PowerApps:
ComponentsIf you haven’t already familiarized yourself with the Site Map and how it works, take a moment to read the blog here. After you have created your Site Map, the next step is to add and define the various components on the App Designer.
Components are displayed on the right-hand side of the App Designer:
Components are listed in the panel on the right-hand side of the App Designer. The Site Map is your foundation and the components are the building blocks you layer on top to build your App. Components are comprised of:
- Artifacts: Entities, Dashboards and Business Processes Flows
- Entity Assets: Forms, Views, Charts and Dashboards
Components in the App Designer. Artifacts- Entities: In most scenarios, the Artifacts will populated based on what you have selected in the Site Map.
- Dashboards: Select the system dashboards that should be included in the app.
- Business Process Flows: Select any business process flows to add to your app. Any active, published business process flows
Entity AssetsOnce you start adding entity assets to your App, you can really work on streamlining and enhancing your end user experience! Always keep in mind who your audience is for this App. What are the only pieces needed for this group of users to do their job? The minimum amount here is key. Give them only what they need in order to successfully do their job and eliminate all of the other noise. This is my favorite part about model-driven apps and Dynamics 365. This sort of thing used to require custom code – and now I can use simple configuration to accomplish the same thing.
- Forms: Define which forms should display for each entity. At least one form must be selected for each entity.
- Views: Select only the necessary views to be included in this App. At least one view must be selected for each entity.
- Charts: Select any system charts for the entity.
- Dashboards: Select dashboards for the entity.
Now that you have created a Site Map for your app and added all components to is (both artifacts and entity assets), your model-driven app is really starting to look good! The final two parts of this series will cover properties you can set and why this is important to your end users.
-
Model-driven apps in PowerApps: Using the App Designer
Welcome to our second blog in the model-driven app series! Today we will focus on getting to know the App Designer. This series includes six articles that will help you to get to know and use model-driven apps and PowerApps:
Security ConsiderationsUsing the App DesignerSite MapComponentsManaging PropertiesBenefits to Your UsersA blank canvas to build your model-driven app! When you open your model-driven App in the App Designer, it will resemble the image above. You will notice a few main areas here:
- Site Map
- Dashboards
- Components (Artifacts & Entity Assets)
- Properties
Using the App Designer is fairly simple and should be familiar to System Administrators as it uses a similar drag and drop configuration style used in building business rules and business process flows. Microsoft has done an excellent job making configurations like these accessible to the less technical System Administrator (like yours truly!).
Let’s briefly look at each of these – as all of these areas will be covered thoroughly in subsequent articles.
App Designer AreasSite Map Controls which areas of Dynamics 365 can be accessed in this App Dashboards List of any system dashboard included in the App Components A list of entities and entity assets (forms, views, charts) that are in this App Properties Name and description of the App, custom icon (optional), unified interface URL Stay tuned for the rest of this series on building a model-driven app in Dynamics 365 using PowerApps, where we will dive deeper into the Site Map, Components and Properties.
-
Security Considerations when building a model-driven app in PowerApps
If you’re a Dynamics 365 System Administrator, chances are you’ve played around with building model-driven apps in PowerApps. By now, it’s become glaringly clear that this is the direction Microsoft CRM has headed and will continue to head when it comes to configuration and customization.
For those of you have not yet ventured into the world of model-driven apps, this blog series will introduce you to the components, security considerations and functionality to help you get started.
This series will include six articles that will help you to get to know model-driven apps and PowerApps:
Security ConsiderationsUsing the App DesignerSite MapComponentsManaging PropertiesBenefits to Your UsersSecurity ConsiderationsCreating Model-Driven Apps. When building a model-driven app in Dynamics 365 using PowerApps, it’s important to understand security pre-requisites. You will need the System Administrator or System Customizer security role in Dynamics 365, or another role with Create, Read & Write access for Model-driven app.
Accessing Model-Driven Apps. If you are using custom security roles in your organization, it is important to ensure your users have Read access to Model-driven apps on the Customization tab:
Applying security role(s) to App. Take security a step further with model-driven apps and streamline which apps appear for your users. Make sure that they only see the apps they need to see. Here are 4 simple steps to limit access to a model-driven app by security role:
1. Go to My Apps, then select Home
2. In the App box, click the ellipses icon next to the App name
3. A panel will open on the right-hand side. Select the security roles who should access the App.
4. Click Save at the bottom.
Stay tuned for the rest of this series on building a model-driven app in Dynamics 365 using PowerApps.
-
Building a PowerApp that uses Excel as a database
Part one: Reading data from ExcelFor 100 days, I will be doing 100 push-ups a day. I built a PowerApp to track the push-ups I have done each day.
The PowerApp does the following:
- Lookup a row from Excel containing today’s count
- Calculate and display the remaining push-ups for today. Each day starts at 100.
- Show a set of buttons for the number of push-ups completed.
- When a button is pressed, update the Excel spreadsheet and show the remaining count. This will be covered in a future blog post
To get this project started, I needed my data in Excel. Starting with a blank worksheet, our data starts off like this.
Preparing the Excel file for use with PowerAppsBefore you can connect an Excel file you will need to convert the data into a table. To do this, select cells that contain your data then use Insert > Table with the selected values to convert your data into a table.
Once your table is created, assign the Table Name and rename each of the Column Names to describe the data they contain.
I used the following for my table:
- Table Name: pushupTable
- Column1: Date
- Column2: done
Click the image to watch how this is done
Creating your PowerAppNext, we’ll visit https://make.powerapps.com/ to create a new PowerApp. We’re going to be creating a Canvas App for this project.
This will give us a completely blank screen. You can use the Insert tab to add various items and place them.
To build the push-up tracker, we added the following fields:
- Count label
- “Remaining push-ups” label
- 1 button
- 5 button
- 10 button
- 20 button
- 25 button
- 50 button
With the layout completed, it’s helpful to give each field a meaningful name. You can double click the field name on the Tree view to rename each. You’ll access these within the coding portion of PowerApps so give each a name that will make sense if you have to maintain this later. You can also choose a color theme under the Home tab.
Next, we’ll move on to connecting this to Excel. First, you need to connect OneDrive for Business and select the Excel file and table that you want to use.
Once your table appears as a data source, your excel file is now connected.
Lookup a row from Excel containing today’s push-up countLet’s look at our first requirement for our app:
Lookup a row from Excel containing today's push-up count
Breaking this requirement down into steps, we need:
- Access data from our connected data source
pushupTable
(The Excel table) - Locate a single row matching today’s
Date
- Find the value in the
done
column inside the matching row
Accessing a specific row in Excel from your PowerAppIn order to find a row in our Excel table we use the LookUp function. Here’s the code we’re using:
This code looks up a Record from the table
PushupTable
and assigns it to the global variablepushupsToday
.Calculating and displaying the remaining push-ups for todayAfter we have the record stored in
pushupsToday
we use this to populate a local variable that we will assign inside ourPushup Status
screen. To do this, we assign a Context parameter inside of a call to the Navigate function. Note that the call toNavigate
isn’t required but is used here so we can push the variable into the right area. It’s not possible to create local variables from withinApp.OnStart
any other way.Here is the full code we’ve used in our
App.OnStart
:App.OnStartSet( pushupsToday, LookUp( PushupTable, DateAdd( Date, TimeZoneOffset(Today()), Minutes ) = Today() ) ); Navigate( 'Pushup Status', ScreenTransition.Cover, { Count_text: 100 - pushupsToday.done, loading: false } );
Assigning dynamic label textWe’ve assigned a local variable called
Count_text
with the text that we want to display on the big label. To assign the label to show the value for this, do the following:Why are we using a variable to hold the text?
When we assignCount.Text
to a variable it will update whenever the value of that variable is updated. In a future blog post you’ll see how we use this to always display the most recent data from Excel so that our push-up count is always accurate.Putting everything togetherThe first step in our PowerApp is now done. We are showing the remaining number of push-ups for the current day on top of the app. In coming blog posts we will cover how to enable each of the buttons and how we’ll use what we did today to dynamically update the remaining count so it is always accurate.
As a final walkthrough, lets run our app and show how all of the moving pieces are connected. View the image below to see how the values are captured from Excel and then used to display inside the app.
-
Adding a Logo or Custom Image to a Model-Driven App Tile
PowerApps are a great way for you to streamline the user experience in Dynamics 365. Available for Dynamics 365 Online Customers, creating an App is easier than ever with the PowerApps interface and drag-and-drop App Designer.
Today, let’s show you in a few simple steps how you can replace the Default Image for your App to be a custom image. In this example, I will use the Reenhanced logo. You can use your company’s logo or any image that works for the App you are building.
The default PowerApp Image Tile. This is what your users see when they select an App in Dynamics 365. 1. If your image/logo does not yet exist as a Web Resource, the first thing we need to do is add it. In a Dynamics 365 Solution File, add a new Web Resource.
Adding a new Web Resource to a Dynamics 365 Solution File. Name your Web Resource and upload file. Save, then Preview to ensure it looks right. Finally, Publish your Web Resource. 2. Open your Model-Driven App. Navigate to Properties in the control panel on the right-hand side of your App Designer.
3. Under Icon, uncheck the box next to Use Default Image.
Uncheck Use Default Image under the Properties tab, highlighted here. 4. In the search box above App Tile, find the Web Resource you added in step #1 and select it.
Select your new Web Resource and preview App Tile. Once you Save and Publish the changes in your App, your App Tile will be updated with the new image!