Get what you need – Selecting Columns and Filtering Data

So, I have built some pretty cool stuff with the Power Platform, and I’ve built some things that I’ve come to regret. In the consulting world or at least in my head, there is nothing more embarrassing than creating a problem that could’ve been solved with some due diligence.

Explicit column selection

Have you ever encountered a situation where a Power Platform flow seemed to take longer than expected, leaving you a bit puzzled? I certainly have. One day, I found myself dealing with a flow that was running longer than anticipated, even though I was only retrieving five columns from a Dataverse table. It worked fine in my development environment, but as is often the case, things tend to go smoothly in a controlled development setting. Additionally, I wasn’t working with a large volume of records, so the performance issue was a bit surprising.

After some investigation, I decided to take a closer look at the flow. To my surprise, I realized that I hadn’t explicitly selected the columns during the data retrieval process.

Now, you might be wondering why explicit column selection matters in Power Platform flows. Well, a more practical question to ask is why retrieve and process data that you don’t actually need? Is it worth the convenience of working with larger-than-necessary data?

Explicit column selection plays a crucial role in optimizing the efficiency of your Power Platform flows. By specifying the exact columns you need, you can significantly reduce the data transfer and processing load, resulting in faster execution and better resource management. Let’s explore why this practice is important:

  1. Efficiency: Retrieving only the necessary columns reduces the amount of data that needs to be transferred, leading to quicker data retrieval and processing.
  2. Resource Conservation: Unnecessary data retrieval can strain system resources, potentially causing performance issues. Selecting only the required columns helps conserve resources and ensures smoother flow execution.
  3. Clarity and Simplicity: Explicit column selection makes your flow more straightforward and easier to understand. It clearly communicates the purpose of your actions and contributes to a cleaner, more organized flow structure.

Filtering

Selecting only the necessary columns for your flow is undoubtedly important, but there’s something even more critical: filtering the data. We’ve matured in our approach, and there’s no reason to run a flow “wide-open,” retrieving every record from the database. Sure, we could do it, but that doesn’t mean we should. Whenever possible, applying filters is the key to ensuring that you retrieve the most relevant dataset or record for your specific needs.

Let’s pause and consider this: What exactly are you planning to do with all those rows once you’ve retrieved them? Are you prepared to create additional actions just to extract the record(s) you’re actually interested in?

I understand that you might be new to Power Automate, and it’s great that it can make things work effortlessly. However, let’s take a step further and aim to do it “right” from the very beginning.

Filtering data not only enhances the efficiency of your flow but also ensures that you work with the most pertinent information. Here’s why it’s crucial:

  1. Efficiency and Speed: Filtering data allows you to narrow down your dataset, reducing the processing time and making your flow run faster and smoother.
  2. Precision: Filters enable you to pinpoint the exact information you need, avoiding the hassle of extracting relevant records from a sea of data.
  3. Best Practices: Implementing data filtering is a best practice in Power Automate. It demonstrates a thoughtful and efficient approach to flow design.

Flow

Let’s create a flow. It doesn’t have to be fancy for this exercise; it will be quick.

We have a basic flow here with PowerApps (V2) as the trigger, followed by a Dataverse Action for listing all of the rows in a table.

The table that I am using is the Solutions table, which contains all of the metadata on solutions present in the current environment.

My goal is to only list ‘Unmanaged Solutions‘ and return only a select number of fields.

  1. Columns must be selected by their logical name.

2. Select queries with more than one column must be comma delimited.

3. Our filter will use odata comparison operators.

When you run your flow, your payload will include the columns and filter that you applied to it.


In summary, when retrieving data from any system, it’s best practice to retrieve only what you actually need.

Best Practices: Solutioning Part 1

The Power Platform maker experience can seem like the Wild West. At any moment you can create a component that relies on other components and can create a disaster quickly.

In this series I’d like to cover some best practices, that I’ve seen over the past 5 years of working with the Power Platform – some lessons learned – such as – ‘DON’T BUILD IN THE DEFAULT ENVIRONMENT’ and other.

Solutions explained in a not so Microsoft way…A.K.A. – my way.

Imagine you have a kid with a room bursting with toys. It’s like a treasure trove of fun waiting to be explored. But hold on, it’s also a minefield! Stepping on a Lego here, tripping over something there – it’s an adventure you never signed up for. Sound familiar?

One fine day, you, the heroic parent, decide to bring order to this chaos. You’re on a mission to save your head and your feet from more unexpected encounters with toy-related perils. So, what’s your grand plan? You buy a container—a magical vessel that can hold all the toys.

In essence, a solution is your trusty container. It’s like that superhero utility belt, but for organizing digital goodies. You can get as fancy as you want with how you organize your toys – perhaps all the trucks go in one, Legos have their VIP section, and stuffed animals chill in another. Each container’s job? To amp up the fun!

Now, you might be thinking, “Why not just cram them all into one mega-container?” Well, my friend, think about it this way: when a child wants to supercharge their fun, they focus on one toy at a time, right? Or maybe you swap out the old for something shiny and new—a fantastic upgrade! We divide our solutions because not everything needs an upgrade. Remember, the bigger the toybox, the heavier it is to move.

So, there you have it – solutions are like these nifty toy containers, but for the Power Platform. They house all the bits and bobs that make the digital world go ’round. You can move them around effortlessly, using pipelines or a little digital muscle. And how you put these solutions together? Well, that’s where your creativity kicks in.

In a nutshell, solutions are your secret sauce, your digital playroom organizers. They’ll make your life as a Power Platform Developer/Maker a breeze. So go ahead, dive into the world of solutions, and let the fun (and efficiency) begin! Toys sold separately… 🚀

Creating a Solution

First things first, head on over to the Power Platform environment. You can do this by simply going to either make.powerapps.com or make.powerautomate.com – choose the one that suits your needs.

Now, on the left-hand side, look for and click on the “Solutions” option in the navigation bar.

Here comes the fun part – hit the “+ New Solution” button. That’s the one that gets the ball rolling for creating your new solution.

In the form that pops up, give your solution a cool name. If you’re not cool with the default publisher for your solution, no worries – you can make a new one. It’s actually a good idea to give it a name that makes sense. We can cover the publisher in further posts until then click “The Link” to view “Solution Concepts”… The Link

Finally, just click “Create,” and there you have it – a solution.

Thank you for tuning in… until next time.