• Real-Time Search Strategies for PowerApps – Lessons from the Trenches  – Part 1

    Building enterprise-grade apps in PowerApps isn’t just about screens and galleries — it’s about smart filtering, real-time search, role-aware security, and handling date-time complexities across time zones.

    In this post, I’ll walk through some production scenarios from my projects where I implemented filtering and searching in a modern canvas app with Dataverse as the backend. This isn’t just theory — these are proven patterns from live apps that support thousands of records.

    Scenario 1: Role-Based Filtering Using Modern Combo Box

    In many of my apps, users see different data based on their AAD security role or a custom role field in Dataverse.

    Goal: Show only records where the current user is a regional manager for that location.

    Filter(
    'SiteInspections',
    Region = LookUp('Users', 'UserEmail' = User().Email).Region
    )
    

    If roles are assigned through a custom Dataverse table, I preload the current user’s role into a variable:

    Set(
    varUserRegion,
    LookUp('UserRoles', 'UserEmail' = User().Email, Region)
    );

    And then use:

    Filter(
    'SiteInspections',
    Region = varUserRegion
    )

    📌 Modern Combo Box is used with Items = Choices('SiteInspections'.Region) to give users dropdown control to further narrow their region filter.

    🔹 Scenario 2: Date Filters – Dealing with UTC in Dataverse

    All DateTime columns in Dataverse are stored in UTC. So when filtering with >= or <=, naive local comparisons will fail.

    Use Case: Filter inspections between two dates selected by a user in Eastern Time (EST).

    Filter(
    'SiteInspections',
    DateTimeValue(DateColumn) >= DateAdd(dtpStart.SelectedDate, 4, TimeUnit.Hours) &&
    DateTimeValue(DateColumn) <= DateAdd(dtpEnd.SelectedDate, 4, TimeUnit.Hours)
    )

    Why +4? Because EST is UTC-5 normally, but PowerApps DatePicker assumes local device time and Dataverse returns UTC — so we normalize both ends.

    ✅ In more dynamic cases:

    With(
    {
    utcStart: DateAdd(dtpStart.SelectedDate, TimeZoneOffset(), TimeUnit.Minutes) * -1,
    utcEnd: DateAdd(dtpEnd.SelectedDate, TimeZoneOffset(), TimeUnit.Minutes) * -1
    },
    Filter(
    'SiteInspections',
    DateColumn >= utcStart && DateColumn <= utcEnd
    )
    )

    📌 Use TimeZoneOffset() to dynamically calculate the local-to-UTC conversion.

    🔹 Scenario 3: Multi-Field Text Search That Actually Works

    The built-in Search() function in PowerApps only works on single text columns and often misbehaves when used with Views or multiple fields.

    🚫 Unreliable pattern:

    Search('MyTable', txtSearch.Text, "Title", "City", "ContactName")

    Reliable workaround:

    AddColumns(
    Filter('MyTable', Status = drpStatus.Selected.Value),
    "SearchKey",
    Lower(Title & " " & City & " " & ContactName)
    )

    Then:

    Filter(
    AddColumns('MyTable', "SearchKey", Lower(Title & " " & City & " " & ContactName)),
    SearchKey <> Blank() &&
    txtSearch.Text in SearchKey
    )

    This enables multi-column, case-insensitive search without delegation errors. For large tables, pair this with Dataverse views or indexed columns.

    🔹 Scenario 4: Dynamic Filtering Based on User’s Role + Date + Search

    This is where it all comes together. One of my apps has 1600+ controls and lets users filter based on role, status, search text, and selected date range — all powered by modern controls and optimized for delegation.

    Filter(
    'FieldReports',
    Region = varUserRegion &&
    Status = drpStatus.Selected.Value &&
    DateValue(ReportDate) >= dtpStart.SelectedDate &&
    DateValue(ReportDate) <= dtpEnd.SelectedDate && SearchKey <> Blank() &&
    Lower(txtSearch.Text) in SearchKey
    )

    Here, SearchKey is a preprocessed column created via AddColumns() with Lower(Title & Description & SiteName).

    🔹 Other Tips That Saved My Life

    • Avoid filtering directly on Dataverse Views in production. They’re great for prototyping but unreliable for real-time data queries.
    • Use Monitor Tool to find delegation bottlenecks.
    • Use Concurrent() to fetch lookup tables and user roles at app start, avoiding re-fetching on every screen.
    • Leverage modern ComboBox’s SelectedItems with multi-choice columns:
    Filter(
    'Projects',
    !IsEmpty(Intersect(Choices('Projects'.Type), cmbType.SelectedItems))
    )

    💡 Final Thoughts

    Filtering and searching in PowerApps is not plug-and-play. Real-time enterprise apps need:

    • Smart delegation strategies
    • Local time handling
    • Case-insensitive string search
    • Role-based record shaping

    And most importantly — a developer willing to test edge cases with real data.

    If you’re building a serious PowerApp, I hope these examples give you a jumpstart. Have questions, or want to see code for specific controls? Drop a comment!

    – The PowerXpert

  • Mastering Delegation in PowerApps for High Performance

    When building apps in PowerApps, it’s easy to hit a wall with performance and data limits if you don’t consider delegation. Delegation is the ability of PowerApps to offload data processing to the data source rather than pulling it all into the app. This article explores essential delegation techniques to help you scale your apps and avoid common delegation warnings.


    1. Use Delegable Functions

    Stick to functions that are delegable whenever possible. These allow PowerApps to perform operations directly on the server:

    Delegable functions: Filter, Search, Sort, LookUp, SortByColumns

    Non-delegable functions: ForAll, CountIf, Collect, Sum, Concat, etc.

    Example (Delegable):

    Filter(Orders, Status = "Pending")
    

    2. Avoid Complex Formulas in Filter Conditions

    PowerApps struggles with complex expressions inside filters. Break logic into steps or use calculated columns in your data source when necessary.

    Non-delegable:

    Filter(Orders, Left(Status, 1) = "P")
    

    Delegable Workaround: Add a calculated column (e.g., FirstLetter) in SharePoint:

    Filter(Orders, FirstLetter = "P")
    

    3. Use StartsWith Instead of In

    The In operator is often non-delegable, especially with SharePoint and other connectors. Use StartsWith() to remain within delegation limits.

    Non-delegable:

    Filter(Customers, "John" in FullName)
    

    Delegable:

    Filter(Customers, StartsWith(FullName, "John"))
    

    4. Limit the Data Pulled

    Avoid pulling the entire dataset. Use FirstN() with Sort() to load a limited number of records in a delegable way.

    Example:

    FirstN(Sort(Orders, OrderDate, Descending), 500)
    

    5. Use Views in SharePoint or Dataverse

    Create views with pre-filtered data and connect PowerApps directly to those views. This pushes the filtering to the server, improving performance and supporting delegation.


    6. Use Variables and Timers to Load Data in Chunks

    For very large datasets, consider loading data in timed intervals using variables and timers. This method is non-delegable but improves usability by avoiding timeouts.


    7. Use Delegable Data Sources

    Your choice of data source determines how well delegation works.

    Fully delegable:

    • Dataverse
    • SQL Server
    • Azure SQL

    Partially delegable:

    • SharePoint
    • Excel (on OneDrive)

    Final Thoughts

    Delegation is crucial for building scalable, responsive PowerApps. By using delegable functions, simplifying filter logic, limiting data, and choosing the right data source, you can prevent those annoying warnings and deliver a better user experience.

    Want help tailoring delegation techniques to your specific use case? Drop a comment or question below!

    -The PowerXpert

  • Manage PowerApps Permissions with SharePoint Groups

      Azure AD groups are commonly utilized for managing permissions in PowerApps. However, in scenarios where Azure AD groups are not feasible—due to centralized IT management or the need for more flexible control—SharePoint groups can offer a practical alternative. SharePoint groups allow app owners or site administrators to manage membership directly, without requiring changes at the Azure AD level.

    This approach leverages SharePoint groups to manage user access within a PowerApps canvas app. On app load, a Power Automate flow retrieves the members of a specified SharePoint group and compares them to the current logged-in user to determine access. However, this method introduces performance challenges, as the flow execution can take up to 30 seconds, impacting the overall user experience. To address this, several strategies can be implemented to reduce latency while maintaining the use of SharePoint groups for access control.

    Strategies for Improving Performance:

    1. Preload or Cache Data in Power Automate or SharePoint

    One solution is to preload or cache the SharePoint group member data in a more accessible location. Instead of pulling the group members upon each app load, the list can be periodically preloaded and stored for quicker retrieval.

    • Scheduled Power Automate Flow: Implement a scheduled flow that periodically retrieves the SharePoint group members (e.g., every hour or daily) and stores them in a SharePoint list, Dataverse, or another data source. This allows PowerApps to query the cached data directly, bypassing the need for a real-time flow execution on every load.

    2. Shift User Validation Logic to PowerApps or SharePoint

    Reducing reliance on Power Automate can significantly improve performance. By moving the user validation logic directly into PowerApps or SharePoint, the app can operate more efficiently.

    • Leverage SharePoint Permissions: SharePoint’s native permissions can be utilized to restrict access. This way, users who are not part of the SharePoint group cannot access the app or its underlying data.
    • Direct Queries in PowerApps: Store a list of authorized users in a SharePoint list and use PowerApps to query this list directly. For instance, the Office365Users connector can retrieve the current user and compare it against the stored list, removing the need for a Power Automate flow altogether.

    3. Parallel Flow Execution in Power Automate

    For scenarios where Power Automate is necessary, optimizing the flow to run tasks in parallel can reduce the overall execution time. By splitting the retrieval of members and the comparison against the logged-in user into parallel operations, the flow can execute more quickly.

    4. Optimize the Power Automate Flow

    Review and optimize the Power Automate flow to ensure that unnecessary steps or delays are minimized.

    • Reduce API Calls: Minimize the number of API calls by eliminating unnecessary loops or redundant logic within the flow.
    • Filter Data Within the Flow: Perform filtering operations directly within the flow to reduce the volume of data that is returned to PowerApps. This can streamline the process and reduce latency.

    5. Test and Optimize Data Connections

    Connection speed and stability can greatly impact performance. It’s essential to test and optimize the data connections used in the flow. Performance bottlenecks could be due to connectivity issues, so testing different environments or regions may help mitigate delays.


    By implementing these strategies, performance bottlenecks can be addressed, allowing for smoother, faster access control in PowerApps while still leveraging SharePoint groups. This results in a more efficient and user-friendly application experience without compromising the flexibility and control that SharePoint groups provide.

    -The PowerXpert

  • Unlock Smart Manufacturing Solutions with Microsoft Tools

    Manufacturers today are under pressure to improve operational efficiency, reduce downtime, and respond quickly to shifting customer demands. Yet, many still rely on outdated systems, manual processes, or off-the-shelf software that doesn’t quite fit their unique needs. Enter Microsoft Power Platform — a suite of low-code tools designed to empower frontline workers, engineers, and operations managers to build their own digital solutions, without waiting months for traditional IT development.

    What is the Power Platform?
    The Power Platform includes:

    • Power Apps for building custom apps
    • Power Automate for streamlining workflows
    • Power BI for turning data into actionable insights
    • Power Virtual Agents for creating intelligent chatbots

    Together, these tools provide an integrated, low-code development environment that fits naturally into existing Microsoft 365 and Dynamics 365 ecosystems.

    Power Apps: The Digital Backbone of Smart Manufacturing
    In the manufacturing world, Power Apps enables plant supervisors, quality control teams, and even warehouse staff to create apps that:

    • Track machine maintenance schedules
    • Monitor inventory levels in real-time
    • Log quality inspections
    • Report safety incidents from the shop floor
    • Manage employee shift swaps and task assignments

    With Canvas Apps, teams can create highly tailored mobile apps for field or shop-floor use. With Model-Driven Apps, manufacturing operations can build complex, data-driven systems like a digital work order management system — all without writing traditional code.

    Power Automate: Automate and Eliminate Waste
    Using Power Automate, manufacturers can reduce manual errors and save time by automating:

    • Production order approvals
    • Notifications when KPIs are out of range
    • Daily performance reporting to leadership
    • Supplier onboarding and PO workflows

    Automation helps lean teams scale and focus more on value-added tasks, aligning with lean manufacturing principles.

    Power BI: Visualize and Optimize
    With Power BI, plant managers and executives can get real-time visibility into:

    • Downtime analysis
    • Production line performance
    • Yield and defect trends
    • Supply chain bottlenecks

    By combining Power BI with Power Apps, users can act immediately on insights — for example, opening a maintenance request from a dashboard.

    Real Manufacturing Use Cases

    • A tier-1 auto supplier built a mobile app to log and track downtime events, reducing downtime reporting lag by 70%.
    • A chemical plant automated its safety incident workflow with Power Automate and Power Apps.
    • A furniture manufacturer created a digital Kanban system using Power Apps and SharePoint.

    Why It Matters in Manufacturing

    • Empowers frontline workers to contribute to digital transformation
    • Reduces dependence on external software vendors or IT bottlenecks
    • Increases agility in responding to disruptions in supply chain or production
    • Improves compliance and documentation without paperwork chaos

    Conclusion
    As manufacturing companies embrace Industry 4.0, Power Platform is proving to be a key enabler of agile, digital-first operations. It lowers the barrier to innovation and helps teams build what they need — when they need it. Whether it’s simplifying inventory tracking or building an end-to-end quality management system, Power Apps and the broader Power Platform bring the power of development into the hands of the people who know the work best.

    Power Puffed !