top of page
hero-bg-1.png

Search Content

Search this site

191 results found with an empty search

  • What is the COE and Why you need it

    Do you have Power Apps and Power Automate? Then you need the CoE Toolkit. The Center of Excellence (CoE) toolkit for Power Platform is a set of resources and best practices designed to help organizations effectively adopt and manage the Power Platform. The toolkit includes templates, guides, and other assets that can be used to establish governance, manage deployment, nurture growth, and ensure compliance with industry standards. One of the key benefits of deploying the CoE toolkit is that it can help organizations maximize the value of their Power Platform investment. By establishing a standardized approach to development and deployment, organizations can ensure that their Power Platform solutions are secure, scalable, and compliant with industry standards. Additionally, the toolkit can help organizations to more effectively manage and govern their Power Platform solutions, reducing the risk of errors and ensuring that solutions are aligned with business goals. Another important benefit of the CoE toolkit is that it can help organizations to more effectively collaborate and share knowledge across teams. By providing a centralized repository of best practices and resources, the toolkit can help to promote collaboration and knowledge sharing, making it easier for teams to work together to achieve common goals. One thing to keep in mind is that the CoE isn’t an install it and you are done solution, it is a toolkit. Yes, installing it gets you reporting and insights but to truly see the benefits of CoE you will need to have a plan and update and configure the various resources to meet your business needs. If you're interested in learning more about the Center of Excellence toolkit for Power Platform, we recommend watching this YouTube video: Power Platform COE Kit where Manuela Pichler from Microsoft and I really get into what the CoE is and why you need it. Or if you're ready to roll out the toolkit in your environment, then we would be happy to help with our CoE Toolkit package.

  • Patch Complex SharePoint Columns with Power Apps like Choice or LookUp

    As your skills evolve with Power Apps you are more likely to migrate away from Forms and to using the Patch function. While Patch is easy to use with simple SharePoint columns, such as Text, Numbers, or Dates it can be very difficult with columns like Choice, LookUp, People, or worse yet any multi-select field. This blog is companion content to the YouTube video Patch Complex SharePoint Columns with Power Apps. Below you will find all of the fields covered two ways. Using Controls and using static values. This will help you break down each field type and understand what is going on. Watching the video and then referencing this post will give you the optimal learning. Patch Static Fields If you want to Patch static values to these fields, then it is about shaping your data correctly. For most of these fields that means either as a record or as a table. Not only do you need to get your syntax correct, but you must also include the correct fields. Text columns including Title, Single line of text, and multiline of text need you to pass a Text value, often entered with a " around it. Though you could get the text from a control, a variable, or a formula. Example: MyTextColumns: "Buddy likes to bark!" MyTextColumns: TextInput1.Text Number columns including number and currency columns need a number. The key here is if you are entering a number then you will type 32 not "32". The second is text 3 and 2, the first is the number thirty-two. Be careful when getting numbers from some controls, like a text input. That will return the text "32" not 32. So you will need to wrap it in a Value function. Examples: MyNumberColumn: 32 MyNumberColumn: Value(TextInput1.Text) MyNumberColumn: Slider1.Value MyNumberColumn: 12+5 Date columns including Date Only and Date Time columns need a date time object passed to them. You can use a Date Picker, a function, or a refence to a date time object like a variable. Examples: MyDateColumn: Today() MyDateColumn: Now() MyDateColumn: DatePicker1.SelectedDate MyDateColumn: DateValue("12/25/2023") MyDateColumn: DateTimeValue("12/25/2023 1:15 PM") Complex Single Record Columns including Choice column, LookUp column, and Person or Group column need a record provided to them. The record will be in the form of {ColumnName: ValueColumnWants}. Different columns will have different fields in the record and will have different required fields. The video does go into greater detail and demos other scenarios. You will need to replace things like Id and TermGuid with the correct values for your data. Examples: MyChoiceColumn: {Value: "Blue"} MyLookUpColumn: { Id: 1, Value: "Nicola" } MyPersonColumn: { DisplayName: "", Claims: "Chewy@powerapps911.com", Department: "", Email: "", JobTitle: "", Picture: "" } MyManagedMetadataColumn: { Label: "Term 1", Path: "", TermGuid: "4ce373ea-d525-4975-9d44-367f1eedfa68", Value: "", WssId: 0 } Complex Table columns including columns such as Multiple Choice column, Multiple Person or Group column, Multiple LookUp column, and Multiple Metadata column. For each of these you will need to create a table of data. Take the record you created above and wrap it in a Table function. Examples: MyMultiChoiceColumn: Table({Value: "Blue"},{Value: "Pink"}) MyLookUpColumn: Table( { Id: 1, Value: "Nicola" }, { Id: 2, Value: "Chewy" }) MyPersonColumn: Table( { DisplayName: "", Claims: "Timmy@powerapps911.com", Department: "", Email: "", JobTitle: "", Picture: "" }, { DisplayName: "", Claims: "Bud@powerapps911.com", Department: "", Email: "", JobTitle: "", Picture: "" }) MyManagedMetadataColumn: Table( { Label: "Term 1", Path: "", TermGuid: "4ce373ea-d525-4975-9d44-367f1eedfa68", Value: "", WssId: 0 }, { Label: "Term 2", Path: "", TermGuid: "2ce373ea-d525-4975-9d44-367f1eedfa71", Value: "", WssId: 0 }) Image columns require you to pass an image. The easiest way to do this is reference an Image control. Example: MyImageControl: Image1.Image Yes No columns require you to pass a Boolean value aka true or false. Example: MyYesNoColumn: true Hyperlink columns only allow you to set the URL not the description. And cannot be patched when set to Picture mode. Pass the URL as text. Example: MyHyperlinkColumn: "https://training.PowerApps911.com" Below is the full Patch statement from the video. Patch( 'Complex Columns', Defaults('Complex Columns'), { //If you want to get rid of this column set it to not required. You can't delete it, but you can ignore it. Title: "Item #" & varItemNumber, //Multiline of text is exactly the same, just supports more text MyTextColumn: "Text is super easy", //Number and Currency work the same. Just give it a number MyNumberColumn: 32, //Pass a date or a date time. It doesn't care. //Today(), Now(), or DateValue("12/25/2023") are common values MyDateTimeColumn: Today(), //Choice columns even let you send a choice that isn't in the list MyChoiceColumn: {Value: "Blue"}, MyMultiChoiceColumn: Table( {Value: "Blue"}, {Value: "Red"} ), MyLookUpColumn: { Id: 1, Value: "Nicola" }, //Only Claims field is required MyPersonColumn: { DisplayName: "", Claims: "Chewy@powerapps911.com", Department: "", Email: "", JobTitle: "", Picture: "" }, MyMultiPersonColumn: Table( { DisplayName: "", Claims: "Nicola@powerapps911.com", Department: "", Email: "", JobTitle: "", Picture: "" }, { DisplayName: "", Claims: "shane@powerapps911.com", Department: "", Email: "", JobTitle: "", Picture: "" } ), MyImageColumn: Image2.Image, //Label and TermGuid required MyManagedMetadataColumn: { Label: "Term 1", Path: "", TermGuid: "4ce373ea-d525-4975-9d44-367f1eedfa68", Value: "", WssId: 0 }, MyYesNoColumn: true, //There is no way to set Alternative Text/Description MyHyperlinkColumn: "https://Training.PowerApps911.com" } ) Patch from Controls When using a control to provide the values for your SharePoint item they will do most of the work. The key challenge is understanding which control you want to use. Dropdowns - You will primarily use these for fields that are single select. Choice column LookUp column Managed Metadata column You will set the Items property of the dropdown to be Choices(YourListName.YourColumnName) Then when you patch those fields your column will look like: Because you used the Choices function it shaped the record the way you needed. Combo boxes - These controls are typically used with: Multiple Choice column Person or Group column Multiple Person or Group column Multiple LookUp column Multiple Managed Metadata column This is because combo boxes allow for multiple selection and output as a table. You will notice also that Person or Group column, even multiple select, must use a Combo Box. That is because of how Choices works with that column. Just like with a dropdown; you will set the Items property of the dropdown to be Choices(YourListName.YourColumnName) To patch a Multiple select field from a combo box you will use SelectedItems to get a table or Selected to get a single record. Once again, thanks to the Choices column and you selecting the correct control and output, you don't have to do any extra work. The other field types are shown below in the full Patch statement. Patch( 'Complex Columns', Defaults('Complex Columns'), { //If you want to get rid of this column set it to not required. You can't delete it, but you can ignore it. Title: "Item #" & inpTitle.Text, //Multiline of text is exactly the same, just supports more text MyTextColumn: inpText.Text, //Number and Currency work the same. Just give it a number //Make sure you are using Value function to convert text to number if needed MyNumberColumn: Value(inpNumber.Text), MyDateTimeColumn: dpDateTime.SelectedDate, MyChoiceColumn: ddChoice.Selected, MyMultiChoiceColumn: cbChoices.SelectedItems, MyLookUpColumn: ddLookUp.Selected, MyPersonColumn: cbPerson.Selected, MyMultiPersonColumn: cbPersons.SelectedItems, MyImageColumn: UploadedImage1.Image, MyManagedMetadataColumn: ddManagedMetadata.Selected, MyYesNoColumn: tglYesNo.Value, //There is no way to set Alternative Text/Description MyHyperlinkColumn: inpHyperLink.Text } ); As you can see. Patching is pretty awesome stuff. Sometimes you can just get a little overwhelmed with all of the different ways it can be used and how every complex column is slightly different. If you want to get help with your Patch or other Power Apps challenges check out the services we offer here at PowerApps911. Including mentoring and ad hoc, where we hop on a screenshare with you and just fix your challenge. You can buy as little as 30 minutes. Fill out the contact us form on the home page and someone will get back to lickity split. 😎 Also, if you prefer to learn on your own, there is a downloadable app and code snippet included with this video in our YouTube training library for only $15/month!

  • Power Apps import Excel to SharePoint list or any data source with Power Automate

    A Power App that imports data from an Excel file to a SharePoint list (or any data source) can be a game changer for a business. This integration not only streamlines the data entry process but also allows for better data management and organization. By automating the process with Power Automate, businesses can save time and resources while improving the accuracy and reliability of its data. Additionally, the data can be easily accessible and updated from anywhere, making it easier for teams to collaborate and make informed decisions based on real-time data. In this post we will go through the Shane’s video where he shows you how to use Power Apps to import an Excel file to your SharePoint List or other data source. As always, Shane breaks it down and reveals how to handle a few gotchas because of dates and using dynamic data from the Excel file. Click the video below to get started! Click the link below to view more of Shane Young's videos: https://www.youtube.com/@ShanesCows Key Timestamps: 0:00 Power Apps import Excel to SharePoint list or any data source 0:59 Demo of the Excel xlsx file import to SharePoint list with a Power Automate flow 2:18 A demo and explanation of the Power Automate flow 8:25 Create the flow, connect it to Power Apps, and Create file in SharePoint 9:48 Excel Online Business Get Tables 11:17 List Rows Present in a Table and the ISO 8601 date format 12:00 Create Item in SharePoint using the dynamic content we imported 14:03 Updating the flow to make the IDs dynamic 14:46 Using the First expression in Power Automate Copying the Excel file up to SharePoint The first step in the process is to generate an Excel file and store it in a SharePoint document library. From there we will be able to use flow to open and read the data we want to import into our SharePoint list. Refer to Shane’s video on How to upload files to SharePoint with Power Apps and Automate for a full explanation on uploading files. Using dynamic content when working with Excel files When using Excel files in Power Automate, we need to reference the column names when working with the data. However, this can become challenging when trying to build a flow using dynamic content from a step that doesn't involve an actual Excel file. This is because Power Automate cannot determine the available columns without reference to a specific Excel file. For example, if you have an Excel file with the following data in Table1: Now try building your flow using dynamic content using List rows present in a table. Actions that we use later in the flow will not have the columns under dynamic content. Next, build the flow directly pointing to our sample Excel file. When we look at the dynamic content, we can see all the column names. Using this method, we can build the rest of the flow and use the columns names. Remember to go back and change the Excel file refences to use dynamic content once you are finished with the flow. Working with Dates between Excel and SharePoint Excel stores data in a different format than SharePoint Lists can understand as a date. In order to make them the same, use advanced options in the List rows present in a table action. Select Show advanced options in List rows present in a table action Click to see the selection for DateTime Format Select ISO 8601 Writing the Excel to the SharePoint List When writing data to your SharePoint List (or other data sources), Power Automate tries to present only dynamic content that matches the content type that the column can exist. So you may have a SharePoint list column that can only accept numbers, but you won’t be able to select the Excel column from dynamic content. If this happens, just type in the name of the column to search and it will appear. Deleting the Excel File Once the data has been written to the SharePoint List, you will want to delete the Excel file you created earlier from SharePoint. This not only prevents unnecessary duplication of the Excel file, but it also allows the Flow to process another Excel file with the same name. The issue is that SharePoint places a “lock” on a file when it is first created which will prevent you from deleting it right away. Instead of waiting for the lock status to clear on its own, use the following SharePoint Rest API to release the lock as documented from www.cleverworkarounds.com. _api/web/Lists/GetByTitle('')/GetItemById()/recycle Conclusion Incorporating a Power App that imports data from Excel to a SharePoint list (or any data source) with Power Automate improves data management, accuracy, and accessibility. The steps outlined in this blog post provide a guide to help businesses implement this integration. With the power of Power Apps and Power Automate, businesses can now easily streamline their data entry processes and take their data management to the next level. Links How to upload files to SharePoint with Power Apps and Automate How to clear annoying Excel file locks in Power Automate – CleverWorkarounds Additional Learning: Power Platform University Are you looking for full, personalized Power Platform training? Do you want a mentor to help guide you on your journey? Do you prefer real world content instead of academic concepts? Then Power Platform University from PowerApps911 is for you. Learn more here. If you prefer to learn on your own, there is a downloadable app included with this video in our YouTube Training Library for only $15/month!

  • Power Apps OnError to capture, suppress, and report all errors

    Are you tired of your users getting errors in PowerApps? Then check how you can use the OnError property to deal with all of those unhandled errrors. Error messages from bad inputs, functions missing data, or even a Patch function gone wrong can all be dealt with without breaking a sweat. You will learn about OnError, IfError, Error, IsBlankOrError, Left, If, Filter and more. If you have errors in your Power Apps you need this video. Click the video below to get started! Click the link below to view Shane Young's YouTube channel: https://www.youtube.com/@ShanesCows Key Timestamps: 0:00 Get Started Power Apps OnError is a property on your app which lets you capture all your unhandled errors 1:51 PowerApps IfError and Handled Errors Shane explains what IfErrors and Handled Errors are in Power Apps 2:28 Unhandled Errors in Power Apps Shane explains what Unhandled Errors are in Power Apps Unhandled errors occur when Power Apps is not sure what to perform and it shows the error back to the user 3:06 PowerApps App OnError property The OnError property gives you the ability to put in code that run every time you encounter an error 5:35 Logging all of your Power Apps errors to a SharePoint data source Make a list of your Power Apps errors 9:08 Suppressing Power Apps error messages Shane explains how to use an If logic to suppress error messages 11:33 AllErrors Occasionally you may run into errors where you are getting multiples and you need to check the table - AllErrors is that table 12:44 Using Left to deal with an error message over 255 character limit When having a character limit issue, you are able to patch only the first 255 to meet the limit and stop receiving errors 14:13 Patch Errors handled vs. unhandled and what to do with them 15:50 Using the Error function to create your own Error Record Additional Learning: Power Platform University Are you looking for full, personalized Power Platform training? Do you want a mentor to help guide you on your journey? Do you prefer real world content instead of academic concepts? Then Power Platform University from PowerApps911 is for you. Learn more here.

  • Power Apps and Automate Solutions and Environment Variables for SharePoint

    Moving your Power Apps apps and flows between environments or tenants doesn’t need to be painful! Microsoft has built in an effective method of doing this in the form of Solutions. Using Solutions in combination with Environment Variables is an efficient way of making your creations portable while at the same time removing a lot of the hassle that usually tags along when you’ve got SharePoint lists involved. Click the video below to get started! Click the link below to see more of Shane Young's YouTube channel: https://www.youtube.com/c/ShaneYoungCloud/videos Defining Power Platform solutions and environment variables (1:20) A Power Apps Solution is an object in the Power Platform that allows you to bundle together the various components of your Power Platform project. Solutions can contain Apps (both Canvas and Model-Driven), Power Automate flows (both Cloud and Desktop), PowerBI Dashboards, Dataverse tables, Component Libraries, plus a whole lot more. Nearly anything related to the construction of your solution can go into the aptly named “Solution” for easy transport. As you may have noticed, missing from the list was SharePoint Lists. Unfortunately, you can’t package up a SharePoint list to move around like you can those other elements. What you can do, however, is use an Environment Variable. You’ll link your app to the environment variable, and that variable will be configured in each environment to point at the corresponding SharePoint list. So while you can’t include the SharePoint list in your Solution, involving environment variables is the next best thing, and through the rest of this article (which follows Shane’s video on the subject) you’ll learn how to do just that! Let’s get started! Create a solution (3:39) Go to https://make.powerapps.com Using the Environment selector in the top-right corner of the screen, switch to your Development environment. (If you don’t have a developer environment yet, pause what you’re doing, and follow these instructions from Microsoft on setting one up, it’s free! Don’t worry, we’ll wait…) In the menu on the left, click on Solutions. If you don’t see Solutions, you might need to click … More and you’ll find it in there! On the Solutions screen, click + New solution Give the Solution a descriptive Display name. The Name field will follow suit, but just remove any unacceptable characters from the Display name, like spaces, hyphens, etc. Next you’ll need to select a Publisher. Automatically, there will be a default publisher available. The Publisher basically drives what the prefix of all the objects in the Solution will use in their naming. This is especially important in Solutions involving Dataverse, where calling the objects by their system names (including that prefix) comes into play. Since we aren’t doing that in today’s example, sticking with the default publisher is fine, but if you will be building Solutions in the future, setting up a custom publisher with a friendlier prefix will be helpful. You can leave everything else at its default setting and click Create. Once your Solution is created, you’ll be sitting at the screen showing your brand new, empty solution. Here you want to click + New, hover over Apps and let’s add a Canvas app. Give your app a name and choose its format. For our purposes, we’ll choose a Tablet app. And click Create. Make sure you save your app. Once the initial save operation has completed, click Settings. On the General page, scroll down and find the setting “Automatically create environment variables when adding data sources.” Toggle this setting to ‘On’. Save your app again. When the save completes, click the Back button in the Power Apps toolbar, click Leave on the dialog box. This will exit out of the app. When you land back in the view of objects in your solution, click the 3 dots to the right of your app name and choose Edit to get back into the Studio to continue building your app. Before we get back into building the app, first let’s open a new tab and go to your tenant’s SharePoint. Go to a SharePoint site where you have the ability to create a new list. (If you don’t have access permissions to create lists, send a request to whoever handles List creation for your tenant and include the details in steps 18-20 to have them build the List you need.) On the landing page for the SharePoint site, click the Gear icon in the top-right and choose Site contents. Click + New and choose List and choose Blank list. Give the list a name and optionally a description, uncheck the “Show in site navigate” box and finally click Create. On SharePoint List naming: Always remember that you only get to name your SharePoint List once. You can edit the name, but this is a cosmetic change only, deep down the list’s name never changes. Since the list name becomes part of the URL to the list, SharePoint will automatically replace special characters and spaces in the list name with URL-friendly codes. If you put a space in your list’s name, for example, “List Name”, SharePoint will create a list with the name: List%20Name. You should always, always, always name your SharePoint List with no spaces or special characters. You can then go back into the List Settings later and rename the list with spaces and special characters so it displays how you prefer, but the underlying list name will be that simple name with no spaces and special characters, which makes for a much better experience when working with the list in the Power Platform. In your list, add 2 columns: A number column named MyNumber A choice column named MyChoice using the default options of Choice 1, Choice 2 and Choice 3. Add some sample data to the list: Title: Item 1, MyNumber: 1, MyChoice: Choice 1 Title: Item 2, MyNumber: 2, MyChoice: Choice 2 Title: Item 3, MyNumber: 3, MyChoice: Choice 3 Back in your app, click the Data icon in the left-side navigation bar and choose Add Data. Search for SharePoint and choose the SharePoint result (not the SharePoint Sites Dataverse result). If you’ve connected to SharePoint in this environment previously, choose the connection you already have set up, otherwise, click Connect directly (cloud services) and click Connect. Choose the site containing the SharePoint List. Finally choose the List you created and click Save. Because we enabled the setting to automatically create environment variables for new data sources, Power Apps is going to create 2 environment variables. An environment variable for the SharePoint Site that houses the list An environment variable for the SharePoint List itself. NOTE: If you’ve gone through this process before in this environment with the automatic environment variable creation setting toggled on, Power Apps will recognize that there is already an environment variable for the site and ask if you’d like to use the one that already exists or if you want it to create a new one. Otherwise, Power Apps will connect the site and list and you’ll get a banner at the top of the screen that environment variables were created. At this point, add a gallery (Gallery1) to the app and set its data source to the SharePoint List. Add a form (Form1) and set its data source to the SharePoint list and its Item property to Gallery1.Selected. Add a button (Button1) and set its OnSelect property to SubmitForm(Form1). Save your app and Publish it. Now Leave the app by clicking the Back button on the Power Apps toolbar and then clicking Leave in the dialog box. When you load back to the Solution screen, you’ll see you now have 3 elements inside your solution: the app and 2 Environment Variables. Add a flow to your solution (12:25) In your solution view, click the + New button and hover over Automation, then hover over Cloud flow, and click Instant. Give the flow a descriptive name and choose Manually trigger a flow. Then click Create. Click +New step. Search for and click the SharePoint Get items action. In the Get items action step, we would normally click the dropdown arrow and find our SharePoint site that houses the List we created, but we want to take advantage of our environment variables. So instead, click the dropdown arrow next to the box for Site Address and scroll to the bottom where it says Enter custom value and click that. At the top of your dynamic content box, you’ll find all your Environment variables. Click on the environment variable for the Site containing our List. For the List Name, do the same thing, click the dropdown arrow and choose Enter custom value and select the Environment Variable for the List we created. Click + New step and search for then click Compose. Click in the Inputs box and in the Dynamic content box, click Expression. For the expression, type: length() and put your cursor inside the parentheses. Then click back on the Dynamic content tab and choose the value property from the Get items step. Now click OK. Save your flow and do a Test run of it. The results of the Compose step should be 3, or the number of items you added to the site. Click the Back arrow in the top-left of the flow designer to go back to your Solution screen. Now you’ll notice your solution has 5 elements in it. There are the 3 that were there before (the app and 2 environment variables). Then there’s the flow we just added. And finally there is a Connection Reference object for our flow to recognize there is a connection to SharePoint. If your solution lacks that Connection Reference element, click the 3 dots next to your flow, hover over Advanced and click Add required objects. Prepare the environment variables for transport (16:30) So our environment variables are connected and functional in this environment, and we’re now ready to move the solution to a new environment, right? Wrong. Before we can move the solution, we need to make the environment variables ready to work in the new environment by removing their default values. So click on the environment variable for your SharePoint List. In the pane that loads, find the setting for “Current list”. It should currently be showing the name of your SharePoint list. Click the 3 dots next to this dropdown and choose Remove from this solution. This step removes the mapping of the environment variable to the specific list name. The reason we need to remove this is so that we will be required to specify the new mapping during the import of our solution in the new environment. Click Show default value and verify Default list value has nothing in the box. As long as Current list value and Default list value have nothing showing, we can click save because this variable is ready to move. Now let’s do the variable for the Site. So click on that object in your solution. In the pane on the right, next to the dropdown for the Current site value, click the 3 dots and choose Remove from this solution. Double check that Default site value also displays nothing and now this variable is prepared for the move as well. Export the solution (18:09) On the Solution screen, click the Overview button in the left-side navigation. Click the Export button in the top bar above the Solution overview. You will be presented with some options to run before your export your solution. While it is not a requirement, Shane prefers to click Publish each time, just to satisfy himself that there are no unpublished changes. This is not a requirement, but is a good safety tip. Also not a requirement is the option to Run the solution checker to verify there are no errors or other issues that might cause your Solution to have problems. Run this if you want, otherwise click Next. On the next pane, you can set the version number, or just accept the auto-incremented number. Then you need to choose between Managed or Unmanaged for your Solution type. So what do these solution types mean? Essentially, Managed means the solution can only be edited from this environment. Whichever environment or tenant that we export this solution to will only be able to run the apps and flows in the solution, they won’t be able to modify them. A great example for when Managed is useful is if you’re currently in your Dev environment and you will be exporting the solution to a Test or Production environment. On the flipside, Unmanaged means the apps and flows in the solution can be edited from the environment or tenant that we import this solution into. A great example for when Unmanaged is useful is if you’re wanting to provide a copy of your app/flow to a different environment/tenant and they need the ability on that end to modify or peek under the hood of those elements. For our purposes, we’re going to choose Unmanaged. Then click Export. The wheel will spin and then the pane will disappear, and it will look like nothing is happening except right above the Overview, a bar will show up that says “Currently exporting solution”. Once that banner turns green, click the Download button on the right side of it to download the package file for your solution. Import solution into new environment/tenant (21:46) Now switch to the destination environment. This can be done by clicking the Environment switcher in the top-right corner of the Power Apps screen and choosing a different environment or by logging out and logging in to a different tenant. Regardless of which route you’re taking, once you’re into the new environment, click on Solutions in the left-hand navigation bar. Before we can import the solution, we need to create a copy of the SharePoint list for this version of the solution to use as a data source, because remember, the original SharePoint list doesn’t get included in the Solution, the environment variable does. Open a new tab and go to SharePoint for the destination tenant. Create a new list. The list can be named anything you want. The primary concern here is that the list contains the same column structure as the original list. Add some sample data to the list. For sanity’s sake, use different values and even a different number of items than you created on the original list, just so you can easily see if you’re talking to the correct list or not. Once this has been created, we’re ready to jump back to our tab where we’re sitting at the Solutions view on the new tenant/environment. Click Import solution Click Browse. Find the solution file you downloaded earlier and click it then click Open. Click Next. Click Next on the Import overview screen. On the Connections screen, the importer is going to ask you to map the SharePoint connection reference to a SharePoint connection on the new tenant/environment. If you don’t have a connection already established in this environment, you’ll need to use the dropdown to create a new one. If you already have a connection, choose that and click Next. If you have trouble using an existing connection, make sure the token on that connection hasn’t timed out. You might need to refresh that connection’s authentication before it will work properly with the solution. The next screen will show the Environment variables, and it will state that 1 or 2 of them needs updated. If you already had an environment variable for the site, it will not be flagged as needing updated. For the Environment variables, choose the SharePoint site for this tenant/environment from the drop-down that houses the SharePoint list you created in step 4 of this section. Then for the List variable, choose the list you created in step 4 of this section. Click Import The banner at the top of the Solutions view will read “Currently importing solution” Wait for this banner to turn green indicating a successful import. You can now drill into the imported solution and see all the components. If you open the app, you’ll see that the data has seamlessly switched to that from the new list. Note: at the time of this recording, if you go to the Data view in Power Apps Studio, it will show your SharePoint connection to the original list, and if you click the 3 dots and choose to Edit Data, it takes you to the original SharePoint list. This issue has been reported to Microsoft. If you go back to the solutions view and then open the flow, you can run a test without changing anything and you’ll see that it is in fact looking at the new list. Deleting part or all of the solution (29:21) There is a little bit of nuance to deleting solutions from environments. If you go to the main Solutions view and select the solution and click delete, you will receive a warning indicating that when you delete the solution, you are only deleting the package that contains all the elements of the solution. Those elements (the app, flow, variables, etc.) will still remain in your environment. To truly purge everything that was imported, you need to click into the solution to see the list of elements, and from there select each element, click Remove and choose “Delete from environment”. Then once those have been removed, you can delete the solution package itself. Additional learning: Power Platform University Are you looking for full, personalized Power Platform training? Do you want a mentor to help guide you on your journey? Do you prefer real world content instead of academic concepts? Then Power Platform University from PowerApps911 is for you. Learn more here.

  • Power Apps OnError to capture, suppress, and report all errors

    Are you tired of your users getting errors in PowerApps? Then check how you can use the OnError property to deal with all of those unhandled errrors. Error messages from bad inputs, functions missing data, or even a Patch function gone wrong can all be dealt with without breaking a sweat. You will learn about OnError, IfError, Error, IsBlankOrError, Left, If, Filter and more. If you have errors in your Power Apps you need this video. Click the video below to get started! Click the link below to view more videos from Shane Young: https://www.youtube.com/@ShanesCows Key Timestamps: 0:00 Power Apps OnError 1:51 PowerApps IfError and Handled Errors 2:28 Unhandled Errors in Power Apps 3:06 PowerApps App OnError property 5:35 Logging all of your Power Apps errors to a SharePoint data source 9:08 Suppressing Power Apps error messages 11:33 AllErrors 12:44 Using Left to deal with an error message over 255 character limit 14:13 Patch Errors handled vs. unhandled and what to do with them. 15:50 Using the Error function to create your own Error Record Differences between handled and unhandled errors Handled errors are those that we anticipate and have logic to deal. Unhandled errors are those that we did not expect and so we don’t have logic ready to handle them. For example, let’s say your app has the user enter in a number to divide by. If they enter in a zero, Power Apps will throw an error at the top of the screen, “Invalid operation: division by zero”. This is an unhandled error. To turn this into a handled error, we need a way to anticipate the user entering in zero. Using IfError() we can do just that: IfError(Text(1/Value(TextInput1.Text)), “You cannot divide by zero”) Now if the user types in a zero the app will show a message inside the app and won’t throw the invalid operation error. OnError, FirstError, and AllErrors Many times you cannot anticipate every error that could happen with your app. Perhaps you are trying to connect to Dataverse and a column was deleted, or there was a network timeout when writing a file. Using the App.OnError property gives you a way to run code each time an unhandled error happens. To retrieve information about the error we can use the AllErrors table or the FirstError record. Generally, the FirstError record will provide us with the information we are looking for. Using FirstError will always give us the same information as using First(AllErrors). Use Patch for logging errors Sometimes you might want to capture all the errors that an app is having when troubleshooting an issue. Using the App.Error property and the FirstError record we can use Patch() to write the information into a log. An example would be: Patch(‘Error Log’, Defaults(‘Error Log’), {Error: FirstError.Message, ControlName: FirstError.Source}) Stopping error messages There are conditions when you might want to suppress errors. An example from Shane’s video is trying to lookup a user’s profile in Office 365. By using an If() statement in App.OnError, we can choose to ignore any messages related to UserProfile. In the example below, only those errors that don't have the word "UserProfile" will get processed. If(Not(“UserProfile” in FirstError.Message), Notify(“You got the error: ” & FirstError.Message)) Creating your own error You can create your own custom errors for conditions that may not throw a technical error. For example, an app should error if users enter a ship date that is before the order date. Using the Error() function we can trigger the code in the App.Error property: If(ShipDate < OrderDate, Error({Message: “Cannot ship an order before it was ordered”, Kind: ErrorKind.Validation})) Additional Learning: IfError + Patch a blank value with Formula-level error management - YouTube Power Platform University Are you looking for full, personalized Power Platform training? Do you want a mentor to help guide you on your journey? Do you prefer real world content instead of academic concepts? Then Power Platform University from PowerApps911 is for you. Learn more here.

  • Model-driven vs. Canvas Power Apps

    Are you looking to take your app development skills to the next level? Do you want to explore the pros and cons of Model-driven and Canvas apps and learn how to build apps using both technologies? Then look no further than our 10-part series on Power Apps! Our Model-driven and Canvas app development experts walk you through building the same app in each technology, providing in-depth guidance and tips along the way. Whether you're a beginner or an experienced app developer, this series provides valuable insights into the differences between Model-driven and Canvas apps and can help you make informed decisions about which one to use. Here's a breakdown of the topics covered in each episode: Episode 1: Overview and Creating the Solution In the first episode of our series, our experts provide an overview of the series and demonstrate how to create the solution for the app using Dataverse as the data source. Watch the episode here: https://youtu.be/SKSfgyWP2jc Episode 2: Creating the Dataverse Tables In the second episode, our experts show you how to create two Dataverse tables with relationships for the app using a simple design. Watch the episode here: https://youtu.be/7jsNlcFtCo4 Episode 3: Making a Model-driven App Our third episode demonstrates how to customize Dataverse forms and views and create a model-driven app from the tables created in episode 2. Watch the episode here: https://youtu.be/_BPOMjB3f8s Episode 4: Build a Canvas App with Canva and Container In this episode, our experts switch gears and create a canvas app from scratch, starting with a blank tablet app and using Canva designs to create the home screen. Watch the episode here: https://youtu.be/Xe1DanaJ2wQ Episode 5: Add a Gallery to your app Next up, our experts demonstrate how to add galleries for each data source, explore polymorphic lookups to the related data, and set the template fill to make the selected item stand out. Watch the episode here: https://youtu.be/lvXRITZMKU4 Episode 6: Using Forms to View, Edit and Create Data in Canvas Apps In episode six, our experts show you how to add form controls and buttons to change the state of the forms, including ViewForm, NewForm, EditForm, and SubmitForm. Watch the episode here: https://youtu.be/_LbteL8oi5I Episode 7: Better Filtering of Galleries For our seventh episode, our experts demonstrate how to get related records like we saw in the Model-driven app, add a dropdown, and use a filter function to check if the value matches or if the dropdown is blank. Watch the episode here: https://youtu.be/Fstk03c9dcg Episode 8: Security Roles and Solution Export Our experts show you how to create a Dataverse security role, assign it access to the app's entities, and export the solution as managed or unmanaged. Watch the episode here: https://youtu.be/7Qv1Qtsb5ew Episode 9: Import Your Solution, Environments, and Sharing Your App In this episode, our experts demonstrate how to import a managed solution into a new environment, add a test user to the imported security role, and share the canvas and model-driven apps with the user. Watch the episode here: https://youtu.be/PkQQKWd2H-U Episode 10: Dare 2 Compare the Two Apps! In the final episode of the series, our experts compare the two completed apps and discuss some of the pros and cons of each type of app. Watch the episode here: https://youtu.be/Njg6PaTrN2c Don't forget to check out our live Q&A session with Model-driven and Canvas app development experts, where we answer questions from our audience about app development, licensing, and more. Watch the session here: https://youtu.be/raPpNREf9EE Whether you're new to Power Apps or an experienced developer, our 10-part series on Model-driven and Canvas apps provides valuable insights and practical tips that can help you build better apps. So what are you waiting for? Check out the series today and power up your app development skills! If you need help implementing this solution or have any questions about the Power Platform, please check out our Services or fill out the contact form below. We can assist you with everything from fixing one small problem to taking on full-scale projects. We even offer mentoring and Power Platform Training if learning is your top priority. So don't hesitate to reach out and let us help you make the most of your Power Apps experience! If you prefer to learn on your own, there is a downloadable app included with this video in our YouTube training library for only $15/month!

  • Paste a screenshot into SharePoint Rich Text with Power Apps

    Do you want to learn how to paste screenshots into your Power Apps and then save them as files or SharePoint Rich Text? Then this video has you covered. Learn how to paste the image and then save it as a file. Once you have it as a file then you can use your text manipulation functions like Replace to automatically create the link as Rich text. Click the video below to get started! Click the link to view Shane Young's YouTube channel: https://www.youtube.com/@ShanesCows/featured Key Timestamps: 0:00 Get Started Paste a screenshot into SharePoint Rich Text with Power Apps This video covers: RichTextEditor Control, Power Automate Flow, Base64, Replace, Mid, Find, Split, Patch, If, CountRows, and With functions 1:09 Explain the SharePoint column 3:08 Demo the power App Shane demos the Power App he created and is using in this video 6:15 Show the image upload flow Shane shows the flow he created, which has a Power Apps trigger to make upload easier 7:06 Look at the formula for saving the image to the SharePoint Rich Text field 8:22 Breaking down the problem further 17:34 Talking about limitations and how to think about the harder problems Additional Learning: Power Platform University Are you looking for full, personalized Power Platform training? Do you want a mentor to help guide you on your journey? Do you prefer real world content instead of academic concepts? Then Power Platform University from PowerApps911 is for you. Learn more here. If you prefer to learn on your own, there is a downloadable app included with this video in our YouTube Resource Library for only $15/month!

  • Unleash the Power of AI with Microsoft's Copilot for Power Apps: A Game-Changer in Low-Code App Deve

    Hey there, app enthusiasts! Get ready to revolutionize the way you build and interact with software applications, as Microsoft has just announced their next-generation AI copilot for Power Apps! This groundbreaking innovation combines the magic of large language models and low-code development, enabling you to build applications through natural language authoring. Let's dive into the fascinating world of AI-powered app development and explore the incredible features of Copilot in Power Apps. What is Copilot for Power Apps? Microsoft's Copilot in Power Apps is actually two things, at least the way I think about it. First you have Copilot for Makers that allows you to create and modify a table using Natural Language. It can also add real sample data. Once you are happy you then click Create and it builds you an app to view and manipulate that data. Then you have App Copilot. This is a control in the Power Apps app that users can use to interact with their data. The same way you can ask ChatGPT or Bing Chat about a topic you can ask the tool. The only difference is the answer are coming from your table data you pointed it at. This opens up a new world of possibilities, empowering your users to be more productive with their own data. Building Applications with Copilot: A Step-by-Step Guide Are you ready to experience the magic of Copilot in Power Apps? Let me walk you through the process of building an app and interacting with it in new ways using this incredible tool. Follow along in my step-by-step tech walkthrough to get started! https://youtu.be/EKwR8ln2mC4 Integration of Power Virtual Agents Microsoft has also integrated AI-powered Power Virtual Agents into Power Apps, making it even easier for developers to add next-generation chatbots to their applications. With just a few clicks, you can enhance your app with a cutting-edge AI-powered bot that supports your users and offers an unparalleled experience. Availability If you want to get your hands on the preview, then sign up for the waitlist from here. Like the Bing Chat, they are rolling out slowly. But I promise it will be worth the wait. So get yourself on the list now and cross your fingers they pick you sooner than later. Conclusion Microsoft's Copilot for Power Apps is truly a game-changer in the world of low-code app development. With its user-friendly natural language authoring and AI-powered insights, app development has never been this fast, modern, or intelligent. It's time to join the AI low-code revolution and build incredible apps side-by-side with your AI Copilot in Power Apps. The future of app development starts now! So, what are you waiting for? Imagine it, describe it, and let Power Apps build it. If you want to explore more about Copilot for Power Apps then check out my exclusive interview with Clay Wesener from Microsoft, where he explains the how and why of this game-changing technology. https://youtu.be/Jpz-TasOKyk Pretty awesome conversation! Happy coding, everyone! Don't forget to share your experiences with Copilot for Power Apps in the comments below, and if you find this post helpful, be sure to share it with your friends and fellow developers.

  • Power Apps Example using Canva for Design + Full Build

    Let's make a pretty Power Apps app and show everything from end to end. 😍 We use Canva and Pixabay to get our imagery right. Then we use Containers to line things up nicely. Add in some conditional formatting and this PowerApps Example is about perfect. Oh, and did I mention we also show a Patching trick we haven't shown before? This video is a touch long but has a bit of everything. Click the video below to get started! Click the link below to view more videos from Shane Young: https://www.youtube.com/@ShanesCows Key Timestamps: 0:00 Power Apps Example using Canva for Design + Full Build 1:16 Power Apps Example Shopping or To-do list 2:27 Create a blank Phone app 2:50 Using Canva to create a Power Apps Screen background image and get some colors for your app 7:30 Create a gallery screen 8:16 Create a new SharePoint list from Excel 10:07 Setting up the app in a Solution with environment variables 12:41 Using Pixabay to grab images for the app and then making them clickable 15:10 Making a soft background image 20:00 Making a screen for viewing and editing the records using vertical containers and horizontal containers 33:26 Making the records editable with varRecord 41:00 Adding a new record using Patch and varRecord with Defaults Additional Learning: Power Platform University Are you looking for full, personalized Power Platform training? Do you want a mentor to help guide you on your journey? Do you prefer real world content instead of academic concepts? Then Power Platform University from PowerApps911 is for you. Learn more here. If you prefer to learn on your own, there is a downloadable app included with this video in our YouTube training library for only $15/month!

  • Master the New Power Apps Barcode Reader Control: Boost Your Apps with Single, Auto, and Multi-Scan

    Microsoft has recently released an updated Barcode Scanner Control for Power Apps, and it's a game-changer. With new features like single scan, automatic scan, and multi-scan capabilities, it's now easier than ever to integrate barcode scanning into your apps. In this blog post, we'll discuss some of the exciting use cases for barcode scanning in Power Apps and walk you through adding the new control to your app, along with configuring its key properties. Let's dive in! New Barcode Scanner Control in Power Apps The newly released Barcode Scanner Control in Power Apps has brought a range of powerful scanning options, making it a perfect addition to any app that requires data collection, inventory management, or asset tracking. By offering single scan, automatic scan, and multi-scan features, this versatile control can significantly improve the user experience and streamline the scanning process. Use Cases for Barcode Scanning in Power Apps Inventory Management: Easily track and manage inventory by scanning barcodes to update stock levels, product information, or location data. Asset Tracking: Effortlessly monitor and update the status of your company's assets by scanning barcodes and updating relevant details in your Power Apps. Event Management: Use barcode scanning to validate tickets, manage attendance, and streamline check-in processes at events. Retail and Point-of-Sale: Integrate barcode scanning for a seamless point-of-sale experience, simplifying product lookup and data entry. Warehouse Management: Enhance efficiency in your warehouse operations by scanning barcodes to track incoming and outgoing shipments, monitor stock movements, and optimize warehouse space. Field Service Management: Empower field service technicians with barcode scanning capabilities to quickly identify and update the status of equipment, order parts, and manage work orders. Library Management: Streamline the process of lending and returning books, tracking inventory, and managing patron information by integrating barcode scanning into your library management system. 🆘 If you need help with any of these use cases in your business be sure to check out our Power Apps Services. Everything from mentoring to break fix support and even full projects, no matter your need, we have you covered. Adding the Barcode Scanner Control to Your App To add the Barcode Scanner Control to your Power Apps app, follow these simple steps: In Power Apps Studio, open your app or create a new one. Navigate to the screen where you want to add the Barcode Scanner Control. From the Insert tab, select "Media" and then click "Barcode reader." Resize and position the control as needed. Key Properties of the Barcode Reader Control The Barcode Reader Control offers several properties that you can configure to customize its behavior and appearance. Here are some of the key properties you should be aware of: Scanning mode: Choose between SelectToScan (single scan), AutomaticallyScan, and ScanMultiple modes to suit your app's needs. BarcodeTypes: Select the barcode formats that the control should recognize, such as QR codes, EAN, UPC lables, and Code 128. Or just leave it at Auto. Power Apps hasn’t let me down yet finding the code. PreferFrontCamera: Defaults to false so it uses the rear camera. You can also change it within the Scanner interface. Bonus, you can even turn on the Flash. OnScan: Define the actions to perform when a barcode is scanned, such as updating data or navigating to another screen. Barcode Reader Control Outputs This version of the barcode reader outputs a table of the results. Assuming your control is named BarcodeReader1, you would reference the table with BarcodeReader1.Barcodes. This table has 2 columns: Type and Value. Type is the type of barcode that was read, and Value is the data from the scan. The easiest way to view your output is in a Gallery. Set the Items property to: BarcodeReader1.Barcodes, and then ThisItem.Type and ThisItem.Value will display the data you have scanned in. If you want to show a single scan in a label, use the First function like so: First(BarcodeReader1.Barcodes).Value. This will show you the scanned information. If you want to show multiple scans in a label, use the Concat function like so: Concat(BarcodeReader1.Barcodes, Value, ";"). This will show the values separated by a semicolon. Conclusion The updated Barcode Scanner Control in Power Apps is a powerful tool that can significantly enhance the functionality of your apps. With single scan, automatic scan, and multi-scan features, it caters to a wide range of use cases, including inventory management, asset tracking, event management, warehouse management, field service management, and library management. By following the steps outlined in this blog post, you can quickly add the control to your app and start harnessing its full potential. Don't forget to check out our comprehensive YouTube video tutorial on the Barcode Scanner Control for a more in-depth guide and demonstrations of its capabilities: Microsoft Power Apps Barcode Reader

  • Automate your SharePoint Follow-ups with Power Automate

    This guide accompanies Shane’s video which walks through how he solved some real-life problems at PowerApps911 by automating reports and reminders through Power Automate and SharePoint. The Problem The problem we’re trying to solve with this flow is we want a weekly email on leads that are due to be followed up on. The concepts in this video could be used for all sorts of challenges: follow-up on contract renewals, overdue tasks, etc. Click the video to start following along! Click the link to view more videos from Shane Young! https://www.youtube.com/@ShanesCows Getting your Data Source Ready (3:08) To begin, you’ll need your SharePoint data source ready to go. If you don’t want to play around with your live production data, you can make a copy of a live SharePoint list: Go to your SharePoint Site contents screen. Click New > List Choose “From existing list” This will give you an empty copy of your live list. You’ll have all the same columns, but you can create some dummy data to play around with while you’re building and learning. To best follow along with this video/guide: Add a Date and Time column to your list and name it Dateforfollowup. Set it to Date only. Create some records where this column is blank, create some records where this column has a date in the past, and create some records where this date is in the future. Add a Choice column called Status with various choice options related to status, but make sure that one option is Quote Sent. Then make sure some of your records have their Status set to Quote Sent and others are either blank or set to one of the other choices. Add a Person column and call it WhoSentQuote and add some colleagues who don’t mind you sending them a test message, or if you have the ability to create a dummy account, use that account, or do a mix of people, but you want a valid person chosen in this column for all records. Add a Single line of text column called Customer (or rename the Title column to Customer). Make sure this field has data for all records. Add a Single line of text column called Description and make sure this field has data for all records. Once you’ve got your data source ready, let’s build the flow! Create the Scheduled flow (3:51) To begin, go to https://make.powerautomate.com and click the +Create button on the left. Give the flow a descriptive name Choose the desired start date. Choose the desired start time. Choose how often it should repeat. For this guide, we’re doing a weekly flow so keep the “Repeat every” box set to 1 and choose “Week”. The screen will change to show you options for a weekly flow. Deselect each day you don’t want the flow to run. You only want the desired run day to be filled in solid blue, the others should be gray. Once that’s all set, click Create. Add a SharePoint Get Items action (4:42) The first thing we want our flow to do when it runs is gather the information from SharePoint. Click + New step Search for “sharepoint get items” Choose the SharePoint “Get items” action from the results. Choose your Site from the Site Address dropdown. Choose the List where the data you want to work with lives in the List Name dropdown. Expand “Show advanced options” Let’s think about this for just a moment. The way this action is currently set up, it will go to SharePoint and retrieve all the records from the selected List. But remember the problem we’re trying to solve, we don’t want a weekly email with ALL leads, we just want the leads that need to be followed up on. While we could have Power Automate grab all the records from SharePoint and then filter that set down to what we want, that’s a lot of extra work that eats into Shane’s nap schedule, so let’s make this more efficient by having the flow only ask SharePoint for the records we want. To do this, we’re going to use the ”Filter Query” field with our good friend ODATA queries. Use ODATA Query to filter the Dataset from SharePoint (5:11) To build an ODATA query, you need to know the system name (5:45) of the column you want to filter on. This can be different than the display name of the column. To find the system name of the column: Go to List Settings Scroll down to the list of Columns. Find the column you want to filter on, for our example, it is called “Follow Up Week”. Click on the column name. The Edit Column screen will open with the details of the column. Look at the URL for this page in your browser’s address bar. At the end of the URL, look for the portion that says &Field= What immediately follows that = is the system name of the column. So, copy or make note of that. Note: Spelling and capitalization counts! Now let’s jump back to our flow. In the Filter Query box, paste or type the column name exactly as it appeared in the previous step. After the column name type eq null For our example, the query will read: Dateforfollowup eq null This tells SharePoint to only send us records where the Dateforfollowup column is empty. Let’s do a quick sanity check to verify our query is good. (6:24) Click + New step Search for Compose Choose the Data Operation Compose action from the results. Click the Expression tab Type length() Place your cursor inside the parenthesis then click the Dynamic content tab. Choose the “value” placeholder from the Get items step. Click OK Save your flow Click Test Choose Manually and click Test Click Run Flow Click Done. In the flow run results, click the Compose step and verify that the number of outputs matches the number of records in your data source that have null (blank) values in the Dateforfollowup column. That gets us part of the way there, but we also want the records with follow-up dates that are within this week, because we want the reminder to alert us to records that don’t have follow up dates plus records that have follow ups scheduled for this week. Let’s go back to our Get items step and add to our filter query to get everything we want. (7:37) Put your flow back in Edit mode and click on your Get items action. Go to the end of your Filter Query and press the spacebar Now we’re going to use the operator or to add another query to this filter. Type or paste your column name again followed by lt for less than and press the spacebar again. Because we want to know if the date in that column is within this week, we need to do some math, and not just any math, we want to do some date math. So in the box that is hovering to the right, click the Expression tab. The expression should be addDays(utcNow(),6,’yyyy-MM-dd’) Let’s break that down. addDays is a function that does just what it says, it adds days to a given date. The first argument in addDays is our base date, the day we want to add to, so we want this to always be the date that the flow is running, so we’re using utcNow(), which always returns the current date. Then we’re just looking for days that fall this week, so our next argument is 6. And then finally, we want the result to be formatted the way ODATA wants it, so our last argument is ‘yyyy-MM-dd’ Click OK That places our expression as an expression block in our query. But when you use dates in ODATA, it wants the date to be wrapped in single quotes, so place a single quote on both sides of the expression block. Do another sanity check to make sure your additional filter is working correctly. So, test run your flow and expand the Compose step and make sure the resulting number of records is correct compared to what is in your data source. Next, we need to add more filtering to our query. (10:04) Go back to Edit mode and wrap your whole Filter Query in ( ) because we want that whole query to be true, but in addition to that, we also need another query to be true, so type and after the closing parenthesis and then get ready for an additional query because we want the records we’re getting from SharePoint to have a status of Quote Sent. In your Filter Query, after the and which follows your first two queries which are wrapped in parentheses, type or paste the name of your Status column then type eq ‘Quote Sent’ Your query should look like: (Dateforfollowup eq null or Dateforfollowup lt ‘addDays-expression-block’) and Status eq ‘Quote Sent’ If you want, do a sanity check again by testing your flow and checking the Compose’s output. Let’s say you decide you want to include the additional status of “Discovery” in your dataset, you would go to the end of your query and type or Status eq ‘Discovery’ then you would wrap everything after the and in ( ). Your query is saying "I want records where this first group of queries renders a true AND where the second group of queries renders a true". Any time you want to include other conditions, you would just follow this principle of grouping column checks with or operators and then linking that group of queries to the main query with an and operator. So now our dataset retrieval is good, if you want, you can delete the Compose step. (Although it doesn’t hurt to keep it in there for troubleshooting.) Select Data Operation to Get All of the Email Addresses (13:53) Now we want to move on to grab the email addresses that the weekly message needs to go to. Click + New step Search for Select and choose the Data Operation Select action from the results. The From box is where you will specify the dataset we got back from SharePoint, so we’ll choose value from the Dynamic content available from that step. The key field for the Map section is what we want to call the data we are pulling out of that dataset, you’re free to call this anything you want, but we’re calling it EMAIL in our example. For the value associated with the EMAIL key, we want to use the properties available to us because our WhoSentQuote field is a Person field. So, we don’t just want to pick the WhoSentQuote column, rather we want to pick WhoSentQuote Email, because we only want the email property of the person specified in this field. The Select action gets us a sub-table with only the email addresses of the people found in the WhoSentQuote field of the records SharePoint returned to us. Some of those records are going to have the same person in the WhoSentQuote field, so we don’t want to bombard them with a flurry of emails every week; we need to whittle the table of email addresses down to just the distinct addresses. How do we do this? We do this with the Union expression. Let’s take a look. Getting Distinct Items in Power Automate flow using Union (15:13) The first thing we need to do is loop through that sub-table of email addresses. Click + New step Search for apply to each. Click the Control Apply to Each action. In the “Select an output from previous steps” box, click the Expression tab and type union() Place your cursor inside the parentheses, click on the Dynamic content tab and choose the Output of the Select step, add a comma and then click the Output of the Select step again. So your final expression should look like this: union(body(‘Select’),body(‘Select’)) Click OK Inside your Apply to Each loop, click Add an action and add a Compose action. For the Input of your Compose 2 action, scroll down to the bottom of the Dynamic content and choose the Current item from this Apply to Each step. Do a test run to verify. There should be 1 Compose card inside this Apply to Each loop for each distinct email address found. Notice that the data for the result is inside curly brackets, that means the Select is returning the data as a record, and we just want the text of the email address from within that resulting record. Go back to Edit mode. Click on Current item inside your Apply to Each loop’s Compose action. Press CTRL + C to copy this block. Now on the right, switch to the Expression tab. Paste the info you just copied into the expression box. Delete the @{ from the beginning of the expression and delete the } from the end of the expression. So the expression should now be items(‘Apply_to_each’) which returns the record of the current item in the loop. But as we said, we don’t want the whole record, we just want the email address text. So at the end of the expression type ?[‘EMAIL’] This is very similar to in Power Apps using the . at the end of an object to specify a property of the object, but in Power Automate, instead of a . you use a ? and wrap the desired property in [‘ ’] Your expression should be: items(‘Apply_to_each’)?[‘EMAIL’] Copy this expression, then click OK. Still within the Apply to Each loop, click Add an action. Now we want to filter the dataset we received from SharePoint down to just the records containing the current item in the loop’s email address. Search for Filter. Click the Data Operation Filter action. From should be set to the value of the Get items step. For the first value in the comparison logic, choose the WhoSentQuote Email property. For the second value in the comparison logic, click the Expression tab and paste in the expression you just copied. Click OK Now we just need to build a table of the information for our email body and send the email. Let’s keep going! Create HTML Table Data Operation to Build Our Email Body (21:00) Still inside the Apply to Each loop, click Add an action Search for Create HTML and choose the Data Operation Create HTML Table action. For the From on this action, choose the Body of the Filter array step. Click the Show advanced options link to expand for more options. Change the Columns drop-down from Automatic to Custom. The headers for these columns can be whatever you want, they don’t necessarily have to match the column names of your SharePoint List. But you will want to look up and make note of the system names for these columns, they will be needed for the Values. For our example, we want a header for the following: Customer Status FollowUpDate Description For the Values of these columns, we don’t just want the associated columns from the Get Items step from SharePoint. We actually want the associated columns from our Filter Array step. To do this, we need to use an expression. Click the Value field next to our Customer header. In the box to the right, click Expression. Your expression will begin with Item()? Followed by the system name of the associated column wrapped in [‘ ‘]. So for our example, our Customer column was originally the Title column so the expression needs to be: Item()?[‘Title’] Click OK Repeat steps 7-10 for the remaining columns, using the appropriate system names for each column. Hold on though! Remember that your Status column is a Choice column. You’ll need to treat that one differently. If you use the expression Item()?[‘Status’] it will return the whole record of the selected choice inside the choice column. We just need the value, so for the Status column, the expression should be Item()?[‘Status/Value’] Now our HTML is ready to go, all we need to do is have the flow send an email. Send the Follow-Up Email with the Outlook Connector (25:20) Still within our Apply to Each loop, choose Add an action. Search for Outlook send Choose the Office 365 Outlook Send an Email (V2) action. The To: field will be the expression we used earlier in our Filter Array step. But think about building this flow in 2 modes: Testing and Production. When you’re testing, you might fire this flow off 5, 6, or 50 times to fine tune the output. You don’t want to pester the person who will ultimately be receiving the email while you’re testing. So let’s build this step first for our testing phase, and then we’ll explain what to do when you’re ready to move this flow to Production. Since we’re testing, let’s hard-code your own email in the To: field. In the To: field, search for yourself, pick the result. Give the Subject a descriptive name, like Leads for Follow up or something to that effect. In the Body of the email, click the Output of the Create HTML Table step. Press Enter and type: Email would have went to: Then click the Expression tab to the right, and use the expression to get the email we filtered by: items(‘Apply_to_each’)?[‘EMAIL’] Click OK Save and Test run the flow and you should receive the emails for any records that need followed up on, and that line at the bottom should tell you who each email should have gone to. When you are ready to put this flow into live production use, remove the “Email would have went to: “ and items expression from the body of the email and put the items expression into the To: field. Additional Learning: Power Platform University Are you looking for full, personalized Power Platform training? Do you want a mentor to help guide you on your journey? Do you prefer real world content instead of academic concepts? Then Power Platform University from PowerApps911 is for you. Learn more here.

bottom of page