top of page
hero-bg-1.png

Search Content

177 results found with an empty search

  • How to Restore a Deleted Power Apps Canvas App (Step-by-Step with PowerShell)

    Accidentally deleted a Power Apps canvas app? Yeah… that “oh no” moment is real, I know I did it last Tuesday while on a flight. Whoops! The good news: you can restore a deleted Power Apps app The bad news: Microsoft doesn’t give you a button to do it Instead, you’ll use PowerShell and it’s actually pretty easy once you know how. Quick Answer To restore a deleted Power Apps canvas app: Install Power Apps PowerShell modules Run Add-PowerAppsAccount to sign in Run Get-AdminDeletedPowerAppsList to find the app Copy the App Name (GUID) Run Get-AdminRecoverDeletedPowerApp Provide App Name and Environment ID Notes: Deleted apps can be recovered for up to ~28 days Requires Power Platform Admin or Global Admin Restored app will have a timestamp added to name but same link works Before we continue, if you are more of a visual leaner then here is a YouTube video of me doing all of these steps: How to Restore a Deleted Power Apps Canvas App Step by Step Can You Restore a Deleted Power Apps Canvas App? Yes, but only if: The app was deleted within ~28 days You have admin permissions You use PowerShell (not the UI) There is no restore button  in the Power Apps interface. Where People Look First (But Won’t Find It) Let’s save you some time and frustration, I already checked all of these places. Power Platform Admin Center ❌ No way to restore individual apps Restore Environment ❌ Restores everything, which is not practical Power Automate Admin Actions ❌ No restore actions exists COE Toolkit ❌ No recovery option At this point most people assume the app is gone forever! UGH. What You Need Before You Start Windows + PowerShell Power Platform Admin or Global Admin access Step 1: Install Power Apps PowerShell Modules Run PowerShell as Administrator and install: Install-Module -Name Microsoft.PowerApps.Administration.PowerShell Install-Module -Name Microsoft.PowerApps.PowerShell -AllowClobber If you are prompted about trusting repository PSGallery click Y if you trust it (I do) to allow the install to continue. It will not work if you say no. Step 2: Sign In to Power Apps This will cause a pop-up screen where you need to choose your M365 Account that has permissions to do the restore. Add-PowerAppsAccount Step 3: List Deleted Power Apps Now we want to find the app. Use the following Screenshot to put the puzzle together. First enter the cmdlet in the PowerShell window. (Shown with red underline) Get-AdminDeletedPowerAppsList Now, you’ll need your Environment ID (Shown with green highlighter) How to Find Your Environment ID In a browser go to the home of Power Apps and from the URL (between /e/ and /a/). Remember you need to be in the environment where you deleted the app from. Also, in green is my ID, it will not work for you. 🙃 Step 4: Restore the Deleted App From PowerShell enter this cmdlet. Get-AdminRecoverDeletedPowerApp Enter YOUR values for: App Name (Yellow Above) Environment ID (Green Above) Step 5: Wait for the App to Reappear Usually takes 5 minutes Refresh your apps list What Gets Restored? This is the best part: App returns Version history remains Connections still work App functions normally The name will include “restored” + timestamp ❓ FAQ How long can you restore a deleted Power Apps app? Up to ~28 days after deletion. Can a maker restore a deleted Power Apps app? No. You must be a Power Platform Admin or Global Admin. Is there a restore button in Power Apps? No. You must use PowerShell. Does restoring an app bring back data and connections? Yes. In most cases, connections and version history remain intact. Can you restore a Power Apps app without PowerShell? No, PowerShell is currently the only supported method. Quick Recap Deleted Power Apps apps are recoverable Recovery window is ~28 days No UI option exists PowerShell is required Use: Get-AdminDeletedPowerAppsList Get-AdminRecoverDeletedPowerApp Need Help with Power Apps? If you want help building, fixing, or avoiding disasters like this: PowerApps911 can help with: Consulting Training Governance Troubleshooting Basically… everything you wish you had before clicked delete.

  • Streamlining Your Workflow with the Power Platform and QuickBooks

    Here at PowerApps911, we are big fans of practice what you preach. We ourselves use a variety of home-built Power Platform applications to make things run as smooth as possible.     One of the latest upgrades we implemented is a connection from our CRM model-driven app  (where we track all of our time) into QuickBooks (where we do all of our invoicing and billing). We’re a consulting firm – we track all the time we spend working with our clients (we have to keep the lights on somehow, right?). Timesheets are one of those painful pesky duties that our consultants must adhere to and they do a great job of it.     We were failing ourselves with the disconnect between our consultants entering their timesheets and how that tracked time eventually made its way into QuickBooks for invoicing. The disconnect being there was literally no connection between the two systems, and we were manually entering all that time into QuickBooks – resulting in inefficiency and errors.    Enter, the QuickBooks API connector. Our team was able to take the QuickBooks API connector and wire it up to our CRM model-driven app, connecting the correct project to the correct client in QuickBooks, finding the correct project to log the time against and ensuring that only the time that is approved gets added to QuickBooks. Talk about hitting the efficiency jackpot. No more manual data entry, no more head-scratching over whether we billed for the right hours. Every time entry that is submitted gets a quick approval from the project manager, and if it meets the criteria to be added to QuickBooks, then quickly makes its way there.     It's not just about saving time and reducing errors; it's about creating a smoother, more hassle-free operation that keeps everyone on the same page.     We are not stopping there.  Next up is bringing the invoicing information back into the CRM.  Allowing our team to quickly see if an invoice has been paid and creating a one-stop dashboard for each client!  Project Management, Account Management, and Financial information for the client all in one spot – no more 5 browser windows open at once here!    If you use QuickBooks and want to look at the ways you could connect it to your other systems, PowerApps911 is here to help! This is something that we’d love to help you and your business out with! Click the button below to contact us!

  • Import Excel Data to SharePoint List with Power Apps and Power Automate

    You got Excel data (man, do you have lot's of it) and sometimes you need that data into SharePoint. In one off scenarios, no big deal, you go to SharePoint and upload it to the list and life is good. But, what about when that is a daily challenge? That is where automation comes into play. In this guide, we will walk through what it would look like if you had a Power Apps app for the user to upload the Excel file to, then the xlsx file will be passed to Power Automate to extract, filter, and then save the rows directly to a SharePoint list. The key here is Power Automate cloud flows and their ability to interact with Excel files for bulk import and SharePoint. Now, while this will focus on starting at Power Apps, keep in mind that the flow mechanics could be applied to many other scenarios. When a file is uploaded to SharePoint When you receive the Excel file as an email attachment Or even if you had another format like CSV Alright, let's walk through the process of Import Excel Data to a SharePoint list with Power Apps and Power Automate but, before we do, I have another option. If you want more details and to see all of this in action, check out the video I mport Excel Data to SharePoint List with Power Apps and Power Automate Using Power Apps for the User Upload The Power Apps app is pretty straightforward. Give the user an Attachment control, when the Excel file is attached, then run a Power Automate cloud flow to do bulk import. Once the flow finishes successfully, then Refresh the SharePoint list so the user can see their data in the app. Now, if you are not used to the upload method for Power Apps, I have another blog post here: Upload to SharePoint from Power Apps v2 . Using the Power Apps attachment control and the Power Apps v2 trigger in Power Automate, the process is pretty straightforward. Because to make this process easiest, the flow will create the file in SharePoint, then read it, then delete it. Seems like extra steps but it is the best path. Power Automate does the bulk of the work Now lets look at the flow. We will do it in mini sections to make it easier to follow but, everything below is all in one flow. Power Apps v2 trigger and SharePoint Create file The Power Apps v2 trigger for your cloud flow has one input of File type. This allows the app to pass the Excel file to Power Automate. Then the Create file in SharePoint action needs you to configure the site and the document library you want to store the Excel in. Keep in mind, we are only storing it long enough to process it, we will delete it at the end. Or if you want to keep it, that is great also. Either way we need to store it for a hot minute to do the following steps For the File Name and File Content, with the new flow designer they are easily added as dynamic content. Get Tables from Excel The Excel file must have a table, and in this example only one table. This action is getting the list of Tables from the XLSX file so you can reference it in the following action. The Id is the dynamic content from the Create File step. But Shane, my file is a CSV or doesn't have a table. Well, then you are going to have to do something about that. For the last customer, they just made it a requirement that someone turn the data into an Excel Table before upload. Other options, could include using an Office Script to do it for you. That is a little trickier but there is a video here to help: Using Excel Scripts with Power Automate to convert CSV List Rows present in a Table The first three fields are repeats of above but that Table one, that is a tad tricky because you have to use an Expression. first(outputs('Get_tables')?['body/value'])?['Id'] That grabs the Id of the first table from the previous action. Back to the concept of, if you are doing a bulk, repeating upload like this, you are going to have to have a planned structure for your Excel. This has never been a problem for a customer but, I wanted to make sure you were aware. And speaking of customers - What can we do to help you? Just hit the Contact button and let us know. We can help for 30 minutes or 30 months, whatever you need, we got it. Also, at the bottom check out the DateTime Format. If you are going to import dates make sure you have set the format to ISO 8601, the other serial method is confusing and somehow involves 1899. No thanks. Filter Array if Necessary Hopefully you have clean data but I didn't, so I used a Filter Array action to remove all of the unclean rows. Using a formula like: @and( not(empty(item()?['Name'])), not(empty(item()?['Amount'])), not(empty(item()?['Date'])), not(empty(item()?['Email'])) ) This returns only the rows that don't have blanks in any of those columns. Why? Because blank fields will make the whole thing fail. Now in my example, I just threw away the bad rows, but really, you should probably tell the user they had bad data. Loop Through the Rows and Create SharePoint List Items This Apply to each action is looping through all of the Excel rows from the Filter action. For each row of Excel data it is using the SharePoint Create Item action. This is how you do the bulk import from Excel to a SharePoint list. Nothing fancy at this point. Now if you go to set this up with the dynamic file and tables you will have challenges with your dynamic content not showing up. It is annoying. In the first video way back at the top I talk you through that challenge. Long story short, you have to use a static file when configuring the flow. Then once everything is setup you will go back and change things to be dynamic. It is confusing and a big part of the video, so if that is new to you, go watch. Sorry, to much to explain in text. Delete the File Flow is annoying, whoops I shouldn't say that, flow is annoying because sometimes it locks files even though it doesn't really have the file. Is that better? Either way, if you want to delete the Excel file you will need this. You are going to hit the API using the HTTP action as shown above. This will override the file lock that was causing errors. Don't over think it, just use this and move on. Wrapping up for Import Excel Data to SharePoint List with Power Apps and Power Automate There you go my friends. You let a user upload a file with a Power Apps app, then you sent it to Power Automate. Power Automate did all of the hard work of saving the file, grabbing all of the Excel rows, importing them to SharePoint, and then deleting the file. Pretty cool! Remember, if you need help with this or anything else Power Automate just hit that Contact button. We got you!

  • Dataverse security and look up tables

    Configuring your Dataverse security roles will help you keep data from being editable to the wrong target audience. However, if you improperly configure your security role for your lookup tables, you can be in for a headache. This article discusses the problem and the solution! I recently created a Power Apps model-driven app with a main table that had lookup columns to other tables. By using the Power Platform admin center for my Environment, I created two different security roles for the app. On the “Admin” security role I gave complete organization-level access to all the different tables (create, read, update, delete, etc.). For the “User” security role, I gave complete access to the main table and then organizational read  access only to the supporting tables. The problem All was well and good when folks with the “Admin” role were using the app, however, when the “Users” took to the app they noticed that they didn’t have access to any of the supporting tables. Here's what folks with the "User" role began seeing: A perplexing problem! We didn’t want the “User” role to be able to change any of the data, but we needed them to be able to input data into the main table from these supporting tables. One of our PowerApps911 experts, Daniel LeMay, uncovered the problem during a call with the customer. Solving the problem Part A - Don’t start a security role from scratch! When you create a new security role, there are a lot of permissions to various tables throughout a Dataverse environment that you’ll miss. The supporting tables have complex relationships with other tables that you may miss. Some of these permissions are User-level, some are for Business Unit, and some are Organizational access. When you begin thinking about a new security role, think of using a standard Dataverse security role that most closely resembles your users and make a copy of that role to start your new role with that. For example, if you just want someone to have access to the app, but not do any data input, start with the App Opener role. If someone is going to be accessing the app as a user, consider the Basic User  role. There are other roles such as Service Reader, Service Writer and Support User as well. None of these roles is customizable so that you can use these as templates for your security roles. Microsoft has a list of these different roles here . Use one of these as a template. We decided to use the Basic User  role as a template. Here’s a step-by-step guide for how to use an existing Dataverse security role as a template for another security role. 1.      Go to the Power Platform admin center ( https://admin.powerplatform.microsoft.com ) 2.      Select Environments from the left-side menu. 3.      Select the Environment where you want to create the security role. 4.      In the Access pane there is a clickable “ See all ” link under Security roles. 5.      Find the security role you want to emulate in the list of security roles. Select the “More actions” ellipses next to the Business unit number and select Copy . (You can do the same thing from the Copy button in the command bar.) 6.      Once you select Copy , a dialog box appears where you can enter a name for your new role. Input the name for your role. Then select Copy. 7.      After a few moments, your new role will appear on your Security roles list, and you can continue. Part B - Update your supporting table permissions with Append and Append to permissions. Once you’ve provided all of the necessary permissions for your users to access the main table, you can move to the lookup tables. Of course, you need the user to be able to read the data, however, you also need them to be able to have Append  and Append to  permissions for these tables. Why is that?  In Dataverse, the Append  and Append To  permissions are used to control the ability to associate two records in a relationship. This is particularly important when dealing with lookup tables and relationships in model-driven apps. Append  permission is necessary on a table when it has the lookup  of another table on a form . This permission allows a user to add (or “append”) a related record to the table. For example, if you have a Pet Toys Order table that includes a look up to a Customer table, the user will need Append  permission on the Pet Toys Order table to associate a Customer record with a Pet Toys Order record. Append to  permission is necessary on a table when it is being associated  with another table. This permission allows a user to append the table to another entity. In the example above, the user would need Append to  permission on the Customer table to associate it with a Sales Order record. Back to our model-driven app, if our main table has lookup columns to supporting tables, users will need both Append  and Append to permissions to select options in a form based on the main table. This is because when a user selects an option, they are essentially trying to associate a record from the supporting table (Append permission) to a record in the main table (Append To permission). Summary The two takeaways in my lesson were, one , to always use an existing (and working) security role to create a copy as a new role. Two , to include Append  and Append To  permissions for any of the tables being looked up from my main table.

  • Unlocking SharePoint REST API with Power Automate

    In today's digital workplace, the ability to customize and automate SharePoint processes can significantly enhance productivity and collaboration. The SharePoint REST API, when combined with Power Automate, opens a world of possibilities, allowing you to extend beyond the limitations of standard SharePoint functionalities. This post explores why the SharePoint REST API is a game-changer, how Power Automate makes it accessible, and provides practical examples to get you started. Why You Should Care About the SharePoint REST API The SharePoint REST API enables you to interact with SharePoint resources such as sites, lists, columns, and more programmatically. This means you can automate complex tasks, integrate with other services, and build more dynamic and responsive solutions for your organization. Understanding how to leverage the SharePoint REST API can transform your operational efficiency and open new avenues for system integrations. The Ease of Use Provided by Power Automate One of the greatest strengths of Power Automate is its ability to simplify complex processes. When it comes to using the SharePoint REST API, Power Automate provides a user-friendly interface and a variety of pre-configured actions that handle authentication and connection details automatically. This drastically reduces the learning curve and lowers the barrier to entry for automating SharePoint tasks. How to Create a SharePoint Site Using Power Automate Creating a SharePoint site via the REST API with Power Automate involves setting up an HTTP request that specifies the site's properties. Below is a basic example of how to structure your Power Automate flow to accomplish this: Method: POST URI: _api/SPSiteManager/Create Headers: Accept: "application/json;odata.metadata=none" odata-version: "4.0" Body: { "request": { "Title": "Your Site Title", "Url": "Site URL", "Lcid": 1033, "Template": "STS#3", "Owner": " your.email@domain.com " } } Here is my example: How to Create a List in Your New Site After setting up your site, you might want to create a custom list to store data. Here's how you can use Power Automate to send an HTTP request to create a list: Method: POST URL: _api/web/lists Headers: Accept: "application/json;odata=verbose" Content-Type: "application/json;odata=verbose" Body: { "__metadata": { "type": "SP.List" }, "AllowContentTypes": true, "BaseTemplate": 100, "Description": "My Custom List", "Title": "Custom List" } Here is my example: If you are enjoying this. Consider checking out our training options. We have on-demand classes, live classes, and even a full 6 months program to teach you all things Power Platform. For more information check out our Power Platform Training . Adding a Column to Your List To further customize your list, you may need to add columns. Below is how to add a single text column to your list through Power Automate: Method: POST URL: _api/web/lists/getbytitle('Custom List')/fields Headers: Accept: "application/json;odata=verbose" Content-Type: "application/json;odata=verbose" Body: { "__metadata": { "type": "SP.Field" }, "Title": "New Column", "FieldTypeKind": 2, "AddToDefaultView": true } Other Things You Might Want to Do With the SharePoint REST API and Power Automate, the possibilities are nearly limitless. Here are a few more things you might consider automating: - Creating Views : Automate the creation of custom views for your lists to tailor how data is displayed. - Managing Permissions : Set up workflows to manage and update permissions dynamically. - Integrating with External Systems : Send data from SharePoint to other systems like CRM platforms, external databases, or even custom apps. - Accessing SharePoint Groups: Always been surprised this wasn't built in so there is a video just for it. https://www.youtube.com/watch?v=rRnbe1CfQ30 Conclusion The SharePoint REST API is a powerful tool for any SharePoint administrator or developer looking to enhance their site's functionality and automation. Power Automate not only simplifies the process of using the API but also expands the potential of what you can achieve with SharePoint automation. For a full step-by-step guide, including detailed explanations and troubleshooting tips, check out our video tutorial on how to use the SharePoint API with Power Automate . By mastering these skills, you can significantly increase the efficiency and functionality of your SharePoint environment, providing more value to your team and organization. If you need help with this, or anything else big or small in the Power Platform just scroll down the page and fill out the contact form. We would be happy to help.

  • The different types of Power Apps Variables

    If you are going to build great apps sooner or later, you are going to need to use variables. So, in the blog post I am going to break down for you what variables are, why you need them, and then the 5 different types of Power Apps Variables that exist. If you are more of a visual learner, then you can check out my Power Apps Variables video . What is a Variable and Why are They Important in Power Apps? Understanding Variables A variable in the context of Power Apps is a storage location that temporarily holds data while the app is running. Think of a variable as a labeled container where you can store a piece of information that you might need to reference or manipulate later. This information can be anything from a simple number or text string to more complex data structures like tables or records. Types of Data Stored in Variables Variables can store various types of data, including: Text : Strings of characters, such as names or messages. Numbers : Numerical values for calculations or counters. Booleans : True or false values for conditions. Records : Structured data that can contain multiple fields, like a database row. Tables : Collections of records, similar to a spreadsheet. Temporary Nature of Variables It's important to understand that variables in Power Apps are temporary. They only exist while the app is running. Once the app is closed or the session ends, the data stored in the variables is lost. Therefore, if you need to retain data between sessions, you should consider using a data source like SharePoint, Dataverse, or SQL Server to store your data permanently. Importance of Variables in Power Apps Variables are crucial in Power Apps for several reasons: Data Management : They allow you to store and manage data dynamically. For example, you can store user input in a variable and use it later in your app without having to fetch the data again from a data source. Improving Performance : By using variables to cache data, you can reduce the number of calls to data sources, which can significantly improve the performance of your app. This is especially important in apps that handle large amounts of data or need to operate efficiently on mobile devices. State Management : Variables help in managing the state of your application. For instance, you can use variables to keep track of whether a user is logged in, the current step in a multi-step form, or the visibility of certain UI elements. Conditional Logic : They enable you to implement complex conditional logic. You can use variables to store the results of conditional checks and then use those variables to control the flow of your application, such as showing or hiding elements based on user actions. Simplifying Code : By storing intermediate results in variables, you can simplify your formulas and make your code more readable and maintainable. This is particularly useful in complex calculations or when the same value needs to be used multiple times in different places. Practical Example Consider a scenario where you are building a form that collects user information. As the user fills out the form, you can store each piece of information in a variable. Once the form is completed, you can use these variables to validate the input, display a summary, or submit the data to a database. This not only makes your app more responsive but also allows for a better user experience by minimizing delays and reducing the need for constant data fetching. In summary, variables are a foundational concept in Power Apps that enable you to create dynamic, efficient, and responsive applications. By understanding and utilizing variables effectively, you can enhance the functionality and performance of your apps, making them more powerful and user-friendly. Global Variables: How to Create Them and When to Use Them How to Create Global Variables Global variables are accessible from anywhere within your Power App. They are created using the Set function. Here’s how to create a global variable: Set(VariableName, Value) For example, to create a global variable named VarUserName and set its value to "John Doe", you would use: Set(VarUserName, "John Doe") When to Use Global Variables Global variables are ideal for data that needs to be accessed across multiple screens or throughout the app. They are particularly useful for storing user inputs, application states, or any data that needs to persist while the app is running. However, be mindful that global variables can consume significant memory resources, especially in larger apps. For most variable types the most common place you will see them is for OnSelect of a Button control Context Variables: How to Create Them and When to Use Them How to Create Context Variables Context variables are specific to the screen they are created on. They are defined using the UpdateContext function. Here’s how to create a context variable: UpdateContext({VariableName: Value}) For example, to create a context variable named VarPageTitle and set its value to "Home Page", you would use: UpdateContext({VarPageTitle: "Home Page"}) Are you struggling with learning the core concepts of Power Apps and Power Automate? Then check out our training classes! We have Live and On-demand classes no matter what your skill level is. Power Apps Training When to Use Context Variables Context variables are best used for screen-specific data. They are perfect for managing elements like pop-ups, loading spinners, or temporary states that only apply to a single screen. Since context variables are limited to their screen, they help optimize performance by reducing unnecessary data storage. Collections: How to Create Them and When to Use Them How to Create Collections Collections are used to store tables of data. They are created using the Collect or ClearCollect functions. Here’s how to create a collection: Collect(CollectionName, {Field1: Value1, Field2: Value2}) For example, to create a collection named ColContacts with fields for name and phone number, you would use: Collect(ColContacts, {Name: "John Doe", Phone: "123-456-7890"}) When to Use Collections Collections are ideal for managing tabular data within your app. They are useful for scenarios where you need to store and manipulate lists of records, such as contact lists, product inventories, or form submissions. Collections can also be used to cache data from a data source to improve app performance. With Function: How It Is and Isn’t a Variable, How to Create, and Why to Use It How to Create With Function The With function is used to create temporary variables within a specific block of code. It is not a true variable but serves a similar purpose for temporary calculations. Here’s how to use the With function: With({VariableName: Calculation}, Formula) For example, to perform a lookup and use its result in multiple places within a formula: With({UserRecord: Lookup(Users, Name = "John Doe")}, UserRecord.Email & " - " & UserRecord.Phone) Why to Use the With Function The With function is ideal for optimizing code performance by reducing redundant calculations. It is particularly useful in complex formulas where you need to perform the same calculation multiple times. By using With, you can perform the calculation once and reuse the result, making your code more efficient and easier to read. With is most commonly used in a Label to avoid repetive calls Named Formulas: How to Create Them and Why to Use Them How to Create Named Formulas Named formulas are similar to global variables but are defined in the app's formulas section and are automatically recalculated by Power Apps. Here’s how to create a named formula: NFVariableName = Calculation For example, to create a named formula that holds a static value: NFSport = "Soccer" Why to Use Named Formulas Named formulas are perfect for data that doesn’t change frequently and needs to be calculated once. They are managed by Power Apps, ensuring they are recalculated only when necessary. This makes named formulas efficient for static data or calculations that should remain consistent throughout the app’s lifecycle. However, remember that named formulas cannot be changed dynamically within the app. Named formulas can only be created from the Formulas property of the App object. Watch out their syntax is different than most others. Conclusion Understanding and effectively using variables in Power Apps is crucial for creating dynamic and efficient applications. By leveraging global variables, context variables, collections, the With function, and named formulas appropriately, you can manage your app's data more effectively and optimize performance. Each type of variable serves a unique purpose, and knowing when and how to use them will significantly enhance your app development process. If you need help with this or any Power Apps concept, then scroll down the page and fill out our Contact form. We can do everything from 30-minute screenshares to fix your problem to full on consulting projects to build everything for you. Just let us know how we can help.

  • Power Apps Code View for Pro & Non Developers

    Look, I admit, a concept like Code View can be scary to someone who already thinks the concept of "Low-Code" already had too much code. And then you find out that it is YAML and you are like, I am out! Well calm down a minute. Remember, I am not a pro developer either. I don't write C# or Python or whatever. It is okay. YAML is very similar to JSON and remember how happy we all were when we learned that? It is all just text with a specific format. So, let's learn what does code view get us. How about the ability to quickly see what has been modified in a control. How about the ability to copy that code and send it to a co-worker in a Teams chat or email and then they can paste it straight into their app and it just works. How about the ability to paste that code into Notepad or VS Code and edit that code before pasting it back into Power Apps. This opens a lot of doors! Below let's talk about it a bit and give you some examples. But if you are thinking I want to see a deeper dive and I want to see it in action then check out this video Power Apps View Code and VS Code with YAML View Code and Copy Code in Power Apps This one is pretty simple. Now anytime you want to know what properties have been set for a control, right click on it and select View code. Works for controls, containers, and even screens! Once you click you now see all of the non-default properties for that control. Meaning if you have set the Color, you will see the Color, if you are using the default, you will not. You cannot edit through this experience, but you can click Copy Code in the bottom left which will put the code in your clipboard. If you know you want to just copy thecode,e then you can also right click on the control and select Copy > Copy Code. Edit Power Apps code with Notepad Now that you have copied the code you can edit it with any text editor, like Notepad. (In a later section we will talk about VS Code but for now let's keep it easy.) Open up Notepad and paste it in. This text, formatted the way it is, is called YAML. Like JSON, it is just a fancy name for text with some formatting rules. Don't over think it, it is just text. The cool thing is you can edit it and then take it back to Power Apps. In the screenshot below I pasted in our boring button code and added an OnSelect property to create a global variable called varDog and set its value to Buddy. 🐶 Now highlight all of that code and copy it back to your clipboard. Enjoying this? Then you will love our training! Click training at the top of the page and join us for live or on demand training. Everything from intro Power Apps to Copilot AI or even a full 6-month deep dive University! Paste Code in Power Apps Head back over to Power Apps, right click on your screen and select Paste > Paste Code And now look. It creates the button, automatically updated the button name to avoid duplicate Button1 and the OnSelect property is set to Set(varDog, "Buddy") When it comes to pasting in code you can paste single controls, multiple controls, and even containers with all of their child objects. The only thing you cannot paste right now is a whole screen. Very cool. One of the neat scenarios this opens is if I want to give you a control configured with a bunch of awesome settings, I can just give you the text now. 😎 So take this cool image of Buddy going for a swan dive into the pool. All you need to do to get it is steal this fancy YAML. 😜 - Image1: Control: Image Properties: Image: ="https://static.wixstatic.com/media/263017_282af94507eb474d8a8a6dc99e1e7586~mv2.jpg" BorderColor: =RGBA(246, 88, 16, 1) BorderThickness: =10 Height: =277 RadiusBottomLeft: =100 RadiusBottomRight: =100 RadiusTopLeft: =100 RadiusTopRight: =100 Width: =336 X: =40 Y: =36 Boom! You have the diving pup! What about Pro Developers Truth be told, you are why they started all of this. Why? This will open doors for you using Source Control like Github with all of your branches and forks and stuff. And if you install the YAML extension from Red Hat, you can even add the Power Apps Schema. 🤯 Allowing more IntelliSense, throw in some Github Copilot and now you are cooking! To see how to get all of that fun configured check out the video list at the top of the article. This blog post has gotten too long to explain VS Code, and if you are a pro dev, you probably know more than I do anyway. 🙃 Summing it up This is an interesting twist, which opens new doors of understanding and sharing controls for all of us. Yes, it is also meant to power pro developers to do more powerful stuff but doesn't mean the rest of us cannot benefit. If you need help with any of your Power Platform projects let us know, we have lot of options from training, to mentoring, to full scale consulting to help you out. Scroll down a bit more and fill out that contact form and we will be happy to help.

  • Power Apps Text Functions Deep Dive

    In today's post, we're diving into the world of text (or string) functions in Power Apps. If you're working with any kind of data, chances are you'll need to manipulate strings at some point. Whether it's reformatting text, cleaning up user inputs, or extracting specific data, these functions are a key ninja skill you should develop. 🥷 Below we will talk through 17 different Power FX functions that allow you to manipulate your Power Apps data in all ways regardless of if it comes from your users via inputs or from your data sources like Dataverse, SharePoint, SQL, or the other twelve hundred that are available. And because I am super nice there is a code example of each so you can see the practical example and easily cut and paste. 😁 Finally, if you want to see the examples and hear the more detailed explanation of using these Power FX functions, then check out my video on Power Apps Text Functions . It might not win an Emmy, but maybe a Golden Globe? Split, Last, and First Functions One of the most common text challenges you'll encounter is splitting and reformatting strings. A classic example is converting names from "Last, First" format to "First Last". Using the Split function, you can break a string into pieces based on a delimiter (like a comma). From there, the Last and First functions come into play, allowing you to rearrange and clean up the data as needed. Example : Suppose you have a name formatted as "Young, Shane." By splitting on the comma and using First and Last, you can easily reformat it to "Shane Young." Trim(Last(Split(TextInput1.Text, ",")).Value) & " " & First(Split(TextInput1.Text, ",")).Value Index Function Need to grab a specific part of a string, like a middle name? The Index function is your go-to tool. This function retrieves a specific row from a table created by a split function. Example : Splitting "Shane Dog Young" on the spaces between the words would create a table with three rows. The Index function allows you to pull out the second row, which would be "Dog" in this case. Index(Split(TextInput2.Text, " "),2).Value Right, Left, Mid, and Find Functions When you're working with structured text, like invoice numbers or IDs, you'll often need to extract a fixed number of characters. The Right and Left functions allow you to grab a specific number of characters from the end or beginning of a string. For more complex cases, the Mid function is a lifesaver. It lets you extract characters from anywhere in a string, based on a starting point and length. Combine it with the Find function to locate specific characters or patterns in your text. Example : Use Right to grab just the last four digits of a string that represent the invoice number. Or use Left to get the first view characters. This works best when you know the structure of the data, and know it will not change. Right(TextInput3.Text, 4) Left(TextInput3.Text, 3) Example :  Combining Mid and Find is another way to locate part of a string, like earlier when we used Split. The difference here is you might be finding a specific character(s) within the string to start from. Mid(TextInput5.Text,Find("-", TextInput5.Text) + 1, 3) Len Function Sometimes, you just need to know how long a string is. That's where the Len function comes in. This function counts the number of characters in a string and is particularly useful when validating inputs or calculating positions in more complex formulas. Example : Use Len to ensure that phone numbers or codes meet length requirements before processing them further. Len(TextInput6.Text) Upper, Lower, and Proper Functions Standardizing text case is crucial for data consistency. Whether you need everything in uppercase, lowercase, or proper case, these functions have you covered. The Upper function converts all characters to uppercase, Lower converts them to lowercase, and Proper capitalizes the first letter of each word. This is especially useful for normalizing names or email addresses to avoid case-sensitive issues. Example : Use Lower or Upper to standardize email addresses before comparing them, or Proper to clean up user-entered names. Upper(TextInput7.Text) Lower(TextInput7.Text) Proper(TextInput7.Text) Are you enjoying this learning style? Be sure to check out some of my Power Apps and Copilot Training classes . Both Live and On-demand courses available. Trim and TrimEnds Functions Whitespace can be a sneaky issue in user inputs, causing mismatches and errors in your app. The Trim function removes all extra spaces from a string, including those between words. TrimEnds , on the other hand, only removes spaces from the beginning and end of the string. These functions are perfect for cleaning up user inputs and ensuring data consistency, particularly when dealing with form fields or imported data. Those people writing Power BI reports from your data will thank you. Example : Use Trim to clean up a user-entered address or TrimEnds to remove accidental trailing spaces in email inputs. Trim(TextInput9.Text) TrimEnds(TextInput9.Text) Replace and Substitute Functions Sometimes, you need to swap out certain text in a string. The Replace and Substitute functions allow you to do just that, but with a key difference: Replace targets a specific position in the string and replaces it with new text. Substitute finds all occurrences of a specific text and replaces them. Example : Replace a specific word in a sentence or substitute all instances of a special character in a text field. Replace(TextInput8.Text,9,4,"really love") Substitute(TextInput8.Text,"like","🥰") Concat Function The Concat function is the opposite of Split we learned earlier. It takes a table of data and combines it into a single string. This is extremely useful when you need to generate lists from selected items, such as creating a list of email addresses from a Combo Box SelectedItems output. Example : Use Concat to combine multiple selected values into a semicolon-separated list for an email field. Concat(ComboBox1.SelectedItems,Value,"; ") String Interpolation Finally, let's talk about string interpolation – the newer, fancier way to concatenate strings in Power Apps. With this method, you use dollar signs ( $ ) and curly braces ( {} ) to embed dynamic content within your strings. While the old-school & (Ampersand) method still works just fine, string interpolation offers a cleaner and more intuitive way to build strings. Though, thanks to muscle memory, I still use the old way. 🤷 Example : Use interpolation to dynamically insert user names, dates, or other variables into your strings with minimal fuss. As you can see, both ways produce the same output, really just a matter of what works best for you. $"The user {User().FullName} typed {TextInput10.Text} in the box." "The user " & User().FullName & " typed " & TextInput10.Text & " in the box." Wrapping up Power Apps Text Functions Text manipulation is a fundamental skill in Power Apps, enabling you to clean, structure, and transform your data with ease. Whether you're working on a simple form or a complex data process, mastering these text functions will make your apps more robust and reliable. I hope this guide helps you tackle your text challenges with confidence! As always, feel free to reach out if you need assistance, whether it’s a quick fix or a more involved project. Need Power Apps String Function Help? If you need help with this or any other Power Platform topic we are here to help. We can do everything from a quick 30-minute fix to a 30-year project. We also have lots of training classes. (I really want to say 30 courses to stick with the 30 theme but I'm not sure that is true. 🤣 I guess I should count them.)

  • Introduction to Power Pages – Part 2: Creating Pages and Navigation

    In this blog post, we’ll walk through the creation of your pages and navigation buttons that Haylee Adamson created in her demo Intro to Power Pages . If you missed the first blog that talks about “What is Power Pages?” you can review that here . Otherwise, we’re going to jump right into our step-by-step exercise to create a “Community Events” hub in Microsoft Power Pages! Exercise Steps 1.      Go to the website make.powerpages.microsoft.com . 2.      Select Start from blank 3. Enter the name for your site and create a custom web address. Power Pages will check your custom name to make sure that it’s unique, then you can continue by selecting Done . 4.      You’ll see an animation as Power Pages begins building your new site. Once your site is done, you’ll land on a screen similar to the screen below. Notice that your Pages panel on the left shows a navigation section with the Home page selected. The center of the screen is your canvas for the current page, and there’s a Copilot panel on the right side.  5.      Hover over the areas of your page. The header section is editable, and the section below the header has a menu to “choose a component to add to this section”. To the right of List , there’s the option to see More  component options. 6.      Move your cursor up to the header and select the Edit site header  button that appears. 7.      The Edit site header  popup appears, with the Title + logo  tab highlighted. Change your Site title  to “Community Events Hub”. You can upload a Site logo  by selecting Upload image .  8.      In the Add an image  popup, you can choose Upload image  to pick a custom logo to add or pick a “Stock Image”, then select the image you want to display and select OK . You’ll notice how the logo and title immediately appear in your header. 9.      Select the Styling tab in your header popup next. As you hover over the Brand colors filled circles, notice that you can edit these colors to suit organizational preferences. Options for the Layout  tab are related to size, but there will be more in the future. 10.      Close the Edit site header  popup and notice the top right of your home page. This section shows navigation buttons (or a “hamburger” menu determined by the size of your screen – yup, Power Pages adaptable to any size platform!), and as we add more pages, you’ll see those navigation options appear. Let’s add another page to our app by selecting the blue + Page  button at the top of the Pages  panel on the left of your screen. 11.      In the Add a page  popup, input “Add Event” as your page name. Leave the Add page to main navigation box checked, and use the Start from blank  layout, and this will automatically add our new “Add Event” page to the header navigation. Select Add to create this new page. 12.      You should now see your new page titled “Add Event” in your Main navigation  section within the Pages  panel on the left side of the screen, and you should see it in your app’s header navigation at the top right of your header. Remember you can modify your main navigation by selecting the ellipsis to the right of any page in your website and selecting from the available options. For example, if you didn’t want a screen to be in your navigation, you could select the option Move to “Other pages” where it wouldn’t be visible. Other options are available to add comments, edit code, duplicate and delete the page.  13.   Return to your home page and select the section that’s already on your page. Select the section showing below the site header. Then select Layout  and then the 3 Column  option.  14.  Select the left “Add a component” ellipsis/ More button. Then select the Image  option. 15.  Once you do this, you’ll see the Add an image popup appear on your screen, where you can select an image to add. In the example below, we’ve used stock images (Haylee uses some Copilot assistance to create images that she inserts). Do the same with the other two Add a component section to show images roughly related to gardening, pool, and playground. 16.  Hover over the image on the left and select the + (Add a component) button immediately below the image to add a Text  component. 17.  Erase the “Enter text” and label the first image as “Community Garden”. Change the format from Paragraph to Heading1 and center the label using the controls for the component. 18.  Repeat this process for the other two images, labeling them “Community Pool” and “Community Parks”, respectively. TIP: you can triple click any Text component to select all of the text and then begin typing your new text to erase what was previously there. 19.  Add another Text  component under each header label by selecting the “plus” icon below your header components under the three photos. Copilot  can help with the wording, so try it out by using the following prompts and then select the Copilot  button, then select Rewrite , and then you can select Add to page/Replace text  to see Copilot replace your label text. a.      Community Garden: Welcome to our community garden b.      Community Pool: Welcome to our community pool c.      Community Parks: Welcome to our community parks 20.  Let’s add some buttons to the page. Hover over your screen and find/select the Add a section  button below the section with the images. Then select 2 Column . We’re going to add two buttons into our Home screen that will take us to different screens, so a 2 Column section will make it look right. 21.  In the new two column section select Button  from the one on the left. Input “Add Event” for the Button label  and select the option to Link to a page . Select the page “Add Event” from the Select a page  dropdown. Then select OK .  22.  Select the Align  option on your button component (it looks like a shishkabob), and select the Center align option (same picture). This will move your button to the top center of the section. 23.  Adjust the Design  of your button by selecting the paintbrush icon. This gives you a “no code” way to adjust your CSS properties for the component. Make the following adjustments (you can either type them in or use the sliders to adjust the properties): a.      Shadow – 10 px b.      Border – 6 px c.      Corner radius – 7 px d.      Width – 216 px (found on the Layout  tab of the Button design) e.      Height – 58 px ( Layout ) f.        Font size – 23 px ( Typography  tab) Close the Button design  popup. 24.  Duplicate your “Add Event” button by selecting the (…) ellipsis on the right of the component menu. Then select Duplicate . This will add another button immediately below the first. 25.  Drag and drop the new button to the right column of your new section so that you have one button in each column. 26.  Select the button in the right column and select Edit  to rename it from “Add Event” to “View Events”. Since we don’t have a “View Events” page in our app yet, leave it on “Add Event” as the Link to a page . Select OK . 27.  Go to the Pages  panel on the upper left of the screen and select the + Page  button to add another page. In the Add a page  popup add “View Events” as the page name. Then select Add . You will see your View Events  page appear in your navigation section and navigation bar in the app header. 28.  Return to your Home  page and select the View Events  button. Select Edit and change the page link to View Events , then select OK . Now you have buttons with links to both pages in your Community Events Hub. 29.  If you Preview your website now, you will be able to select either button to navigate to the appropriate page. You can also use the header navigation menu to go to the different pages, and you’ll see the page name appear in the url! That’s all we’ll cover during this blog post. Now you should have a good idea how to create pages , add image and text components , and create navigation buttons  for your app. In the next blog post we’ll add a form  and data to Power Pages. Remember that Dataverse  is where your Power Pages data resides. So, you can use your pre-defined Dataverse tables in Power Pages, much like your Lists in SharePoint! Thanks for joining us at PowerApps911 in learning about Power Pages! If you’d like to see a focused class on Power Pages you can sign up for our Power Pages Jumpstart  training.

  • Getting Started with Dataverse: A SharePoint User's Guide

    Let's be honest, Dataverse is the best data source for Power Apps. It has the best performance, most features, and the most delegable functions. But you started with SharePoint, like 99% of everyone else, because it was easy, and you had the license. No problem, I also started with SharePoint. 😎 But there comes a time you want to do more and Dataverse is usually the answer to doing more. So, let's learn how to get started with Dataverse. And to make it as easy as possible, I am going to explain things in SharePoint terms as much as possible. Leverage all of that knowledge you already have. Also, if you prefer to see things in motion then here is the video Getting Started with Dataverse . What is Dataverse? In simple terms, Dataverse is the underlying data platform for Power Apps , Power Automate , Copilot Studio , and the rest of the Power Platform . If you are looking to build your apps and solutions on the best platform, look no further, Dataverse is the answer. Not that it really matters but, under the hood, both Dataverse and SharePoint are built on top of SQL Server . With the biggest benefit of both is Microsoft worries about all of that database tuning and performance, you just use it. 😎 So what are some of the key components of Dataverse? Dataverse vs. SharePoint: Key Differences If you're a SharePoint user, think of Dataverse tables like SharePoint lists . However, Dataverse offers a more robust and scalable solution. Some of the key differences include: - Environments in Dataverse act like SharePoint site collections , isolating data, apps, and security settings. - Dataverse and SharePoint both support relationship management and complex data types , which allows for more sophisticated app development. Both have things like Lookup and Choice columns to help you build a solid data model and use similar terminology in most cases. - Dataverse’s performance and scalability far exceed what SharePoint can offer, making it the go-to option for apps with extensive data requirements. This is because SharePoint is a collaboration portal that we sometimes use as a database. Dataverse is built from the ground up to be a storage system for the Power Platform. Dataverse Tables Let’s jump into the practical side of things! One of the first things you'll do in Dataverse is create custom tables . This is very similar to creating a custom list in SharePoint. One of the biggest differences you may notice is there isn't different types. In SharePoint there are countless templates to start: Dataverse will always be the equivalent of choosing Blank list in SharePoint. Now to be fair, Dataverse is doing a lot to integrate Copilot so you can use words to create your first table or create a table from an existing data source like SharePoint, so you don't always have to start from blank but that is for another day. 😎 Different Column Types Dataverse and SharePoint have a lot of the same column types, not surprising, who doesn't need to store text or numbers? Below let's call out some key ones and talk about any differences you should know. Single Line of Text : Ideal for storing names, addresses, or other short text data. Defaults to 100 characters, can be increased to 4,000. Multiline can be increased to 1,000,000. SharePoint is 255 and ~64,000 and not adjustable. Number fields : With SharePoint you choose a number and it just works, decimals or not doesn't matter. With Dataverse there are Whole Numbers , Decimal , Float , and some other goofy ones. You do need to take a minute and make sure you choose the correct one. Date and time : SharePoint stores these always as full date and time, but has some UI options. In Dataverse, there is Date and time and Date Only + there are different options for how they are stored and returned. Make sure you spend a few minutes here. Lookup : These fields behave the same from a storage perspective in both. There is some coolness when referencing the data from Dataverse called polymorphic lookups, where you can dot (.) your way through the related record. Choice Fields : Same in both from a storage point of view. Filtering and other usage of Choice fields with Dataverse is clunky, I rarely use Choice fields for either product. Yes/No : Unlike SharePoint’s true/false columns, Dataverse uses a choice field for Yes/No values, which can be a bit confusing for SharePoint veterans. Boo! Currency : SharePoint is just a number field with a currency symbol in front of it. Dataverse... It has a robust system of fields and tables to build a currency conversion and rate system, not for the faint of heart but very cool if you need it and learn it. AutoNumber : Dataverse specific field with one thing of note. It is a text field, not a number, which can be confusing when working with it. But if you want an auto Invoice number like INV-0001 that is self-incrementing? This is it. File : Dataverse doesn't have document libraries 😢, so if you want to store files in Dataverse you need to use a File column, same for Images . They work but just not as convenient as a doc library from SharePoint. Formula : Dataverse's newest column let's use Power FX to create formula driven columns. Think of calculated columns on steroids, a very powerful win for Dataverse. Enjoying this? Do you like the way I explain things? You must, you are still reading. 😋 Be sure to check out my Power Platform Training Classes . Both live and on-demand class are available now! Dataverse Licensing: What You Need to Know Before you jump headfirst into Dataverse, it’s important to understand the licensing implications . Unlike SharePoint, which is included in most Microsoft 365 plans , Dataverse requires a premium license. This means that while you can build apps using Dataverse, your end users will need a premium license to access them. Conclusion: Is Dataverse Right for You? While Dataverse comes with licensing requirements, it’s by far the most powerful and scalable data source for Power Apps. Whether you're building simple apps or large enterprise solutions, Dataverse provides a level of performance and flexibility that surpasses SharePoint. If you’ve been frustrated with SharePoint’s limitations or you need to scale your apps to handle more data, then it’s worth exploring Dataverse. And now that you’ve seen how easy it is to create custom tables and integrate with Power Apps, you’re well on your way to mastering the Power Platform. To get help with this or any other Power Platform topic just scroll down the page a bit more and hit the Contact Us button. We are happy to help with anything from 30 minutes screen shares to long term projects. 😎

  • Archive SharePoint List Items with Power Automate

    Do you use SharePoint as a data source? I bet you do. 🤩 If you do then let's talk about the importance of keeping those list sizes as small as possible and how you can use Power Automate cloud flows to help archive off those unnecessary items. Why Archive SharePoint List Items? Archiving isn't just about tidying up; it's about optimizing your app's performance and enhancing the user experience. 1. Overcoming Power Apps Delegation Limits If you've worked with Power Apps and SharePoint, you've likely encountered delegation limits. By default, Power Apps functions like Search can only work with the first 500 records of your data source (though you can bump this up to 2,000). This means those operations are limited to just those records, leaving the rest of your data untouched. Why is this a problem?  Because if your SharePoint list has more than 2,000 items (and let's be honest, they grow faster than weeds), your app can have challenges with data beyond that limit. This can lead to incomplete data views and frustrated users. 2. Boosting App Performance Large datasets can slow down your app. Each time your app loads, it pulls data from your SharePoint list. The more data it has to fetch, the longer it takes. By archiving old or unnecessary items, you reduce the load on your app, making it snappier and more responsive. The way I have always explained this is for every 1,000 more items in your SharePoint list you can feel a slowdown in overall app performance. Purely a Shane made up stat but, that is what it feels like to me. So shrink them lists! 3. Enhancing User Experience Nobody likes sifting through thousands of records to find what they need. A cluttered app can overwhelm users and decrease productivity. Archiving helps keep your app clean and user-friendly. Seriously, I get questions about why can't I have 1000's of items in my dropdown? WHY! Because for starters what users wants to scroll through that much data? Find a way to only show them what they actually need. 4. Compliance and Data Retention Archiving isn't just about performance; it's also about compliance. Many industries have regulations around data retention. Archiving ensures you're keeping necessary records without cluttering your active workspace. So many compliance rules here, I will not even try to list them. But make sure if you are storing data, you are following the rules. Not only for how long you might need to keep it but also who can see it. How to Archive SharePoint List Items Using Power Automate Alright, now that we've covered the "why," let's get into the "how." We'll use Power Automate to create a flow that automatically moves items from your main SharePoint list to an archive list based on criteria you set. Why Power Automate for archiving? The best answer is because it is included. The same license that is letting you build those Power Apps on top of SharePoint lets you use Power Automate cloud flows. So, building a flow to archive your SharePoint lists items is not only easy but it is also "free". If you want step-by-step for building a flow to archive SharePoint list items then click the link to the video. Now building the flow can be easy or it can be hard. That really depends on your level of comfort with Power Automate and the type of SharePoint columns you are using. Most of your common SharePoint columns are easy and just plug and play. Your flow gets the item to be archived and then has a step to create a new item with that dynamic content. You play connect the dots and boom. You can also delete the item if you want. Now for columns like multiple choice they throw a bit of a curve ball. For those you have to use the Select action to get the exact data out and then insert that output into the field. Attachment Column And then finally you have the hardest of the hard, attachment column. It requires a lot of moving parts and multiple actions. I am not even going to try to explain it, if you need to do attachments you will have to watch the video . And then just make sure you go slowly, easy to get confused. Wrapping It Up There you have it! By archiving your SharePoint list items using a Power Automate cloud flow, you're not just cleaning house—you're optimizing your app's performance, enhancing user experience, and sidestepping those annoying delegation limits. So go ahead, give your app (and your users) the boost they deserve! Need a hand setting this up?  We're here to help! Click the Contact us button. We can help you with this or any of your Power Platform challenges. We offer 30 minutes Teams calls all the way to full on project consulting.

  • AddColumns in Power Apps: A Comprehensive Guide for Data Shaping with Power FX

    As Power Apps developers, we frequently encounter situations where we need to manipulate and reshape data dynamically to meet specific app requirements. One powerful tool for this task is the AddColumns  function. Whether you're working with SharePoint, Dataverse, or SQL data sources, understanding how to use AddColumns effectively can make your app development process smoother and more efficient. Why do we need tools like AddColumns? There are lots of reasons but the most common two are: One, we don't own the data source. Meaning we can't change the columns or what is avaialable we have to "make due" with what they provide. So adding our own to facilate functionality is a must. Two, we want to do something advanced. Creating a dynamic list of the next 10 Mondays in a dropdown, building an editable grid, or some other complex scenario where you need to be nimble. AddColumns lets you do all of this and more. In this post, we’ll explore practical use cases of the AddColumns function, along with other helpful data manipulation tips. So, grab your Power Apps toolkit, and let’s dive in! BTW - If all of this reading isn't your jam and you prefer video, I have got your covered AddColumns in Power Apps . We do all of this and then some. Handling Delegation and Performance Before you dive into the functions, one of the critical things to understand when using AddColumns or any of the data shaping formulas is delegation. Delegation  refers to how much data Power Apps can handle and process on the backend server rather than on the client device. Some functions in Power Apps, including AddColumns, are non-delegable , which means that they can only work on the first 500 (or another limit set by your environment) records of your data. If you're working with large datasets, you must be cautious when applying AddColumns, as it might not return all rows, only the ones within the delegation limit. To prevent this, be mindful of where and how you use the function. To better understand delegation, check out our comprehensive guide on Power Apps delegation . Common things to keep in mind All of these functions are used to generate a table with a new shape. As you will see in the examples you can change a data source table or a table you generate. This generated table doesn't affect the table that is being shaped, meaning if you use AddColumns on a SharePoint list it isn't changing the SharePoint list. These functions are most often used in the Items property of a gallery or dropdown. Or if you need it more available then you can capture the output in a collection. What Is AddColumns and Why Should You Use It? At its core, AddColumns  allows you to create a new column in your existing table, based on a calculation or formula, without altering your original data source. This is crucial because in many cases, you’re not allowed (or don’t want) to modify your backend data, especially if you’re dealing with a complex or restricted system like SharePoint or SQL. For instance, imagine you have an employees list in SharePoint with separate columns for First Name  and Last Name , but you want to display a Full Name  in your app. Instead of modifying the data source to combine these fields, AddColumns allows you to do this directly in Power Apps. Example 1: Creating a Full Name Column Let’s start with a basic example. You want to display the full name of an employee in your Power App. Here’s the formula: AddColumns(Employees, FullName, FirstName & " " & LastName) With this simple line, we’ve created a new column, Full Name , that combines the first and last names without touching the data in the original SharePoint list. Example 2: Sorting by Complex Columns Sorting data in Power Apps is generally straightforward until you deal with complex columns , such as Choice  fields. Let’s say you have a Favorite Color  choice column in your SharePoint list, and you want to sort your employees by their favorite colors. Sorting a complex column directly might throw errors. Here’s where AddColumns comes to the rescue: AddColumns(Employees, FavoriteColorValue, FavoriteColor.Value) Now that you’ve created a new text column for FavoriteColorValue , you can sort by it without issue: SortByColumns(AddColumns(Employees, FavoriteColorValue, FavoriteColor.Value),"FavoriteColorValue") Example 3: Grouping Data and Using AddColumns for Summarization Another exciting use case for AddColumns is when you need to group your data or calculate summaries. For example, you may have a list of sales transactions, and you want to group the data by department while calculating the total sales for each. Using AddColumns along with GroupBy  and Sum  functions, you can achieve this seamlessly: AddColumns( GroupBy(Sales, "Department", "GroupedSales"), TotalSales, Sum(GroupedSales, SalesAmount)) This formula adds a new column, TotalSales , to your grouped data, summarizing the sales amount for each department. Note: The screenshot has HourlyWage in place of SalesAmount. My demo data didn't line up exactly with the point I wanted to make. Example 4: Creating Dynamic Date Ranges Using AddColumns Here’s a quick trick for generating dynamic date ranges. Say you want to create a drop-down list of the next 10 same day of the week, starting from today. AddColumns works perfectly with Sequence , a function that generates a sequence of numbers that we can turn into dates. AddColumns( Sequence(10, 0, 7), SameDay, DateAdd(Today(), Value, TimeUnit.Days)) RenameColumns: Adjusting Column Names for Consistency When working with external data sources or collaborating with multiple teams, you may find that column names are not always consistent or easy to work with. That’s where RenameColumns  comes in handy. This function allows you to rename one or more columns in your dataset without altering the actual data source. For example, if you’re working with a dataset that uses the column named Department  but prefer to display it as Dept  in your app, you can quickly rename it using this function: RenameColumns(Employees, Department, Dept) This simple rename action can make your app easier to maintain, especially when aligning with standardized naming conventions across your organization. DropColumns: Clean Up Unnecessary Data Sometimes, you’re working with a dataset that contains more information than you need. Excess data can slow down your app and make your formulas more difficult to manage. That’s where DropColumns  can help. This function allows you to remove unwanted columns from a table without affecting the data source. For example, let’s say you have an employees table with a Photo  column, but the photo is not needed for a particular view in your app. You can drop that column like this: DropColumns(Employees, Photo) By using DropColumns, you streamline your app's performance and ensure that only relevant data is downloaded to your app. ShowColumns: Focus Only on What’s Needed While DropColumns removes certain columns from a table, ShowColumns  works in the opposite direction: it helps you specify exactly which columns you want to have available. This can be particularly useful when you’re dealing with large datasets but only need a few specific pieces of information. For example, if you only want to display an employee’s First Name , Last Name , and Department , you can use ShowColumns to limit the data returned: ShowColumns(Employees, FirstName, LastName, Department) By focusing only on the necessary data, you enhance both performance and readability in your app, ensuring that users see exactly what they need—nothing more, nothing less. Wrapping Up The AddColumns function is an essential tool for shaping and manipulating data on the fly in Power Apps, allowing you to do some really cool stuff. But don't forget about the functions friends. ShowColumns, DropColumns, and RenameColumns all have their magic moment where they are the perfect answer. And the more Power FX you know, the better. If you need help with this, or anything Power Platform related Click the Contact Us button at the top of the page and we would be happy to help.

bottom of page