Skip to content

[canvas-apps][Bug] Generated gallery filter formulas using multiple non-delegable patterns #95

@korchard333

Description

@korchard333

Plugin

canvas-apps

Plugin Version

preview (latest as of April 2026)

Skill / Command

compile_canvas

Bug Description

The plugin generated gallery filter formulas using Power Fx functions that are not delegable to Dataverse. This means the generated app silently limits evaluation to the first 500 records, producing incomplete results with no visible error to the end user.

This is a plugin output quality issue — the correct delegable alternatives are well-documented in Power Apps and should be preferred by the plugin when generating Dataverse-connected gallery filters.

** Examples of patterns the plugin generated (non-delegable):**

  • exactin / in operators
  • Lower() / Upper() in filter predicates
  • Text() wrapping OptionSet values in comparisons
  • CountRows() on possibly large datasets
  • Switch() inside filter predicates

These delegation violations were not necessary when there are delegable options available.

Image

Steps to Reproduce

  1. Use the plugin to generate a Canvas App connected to a Dataverse table with a Gallery and search/filter controls
  2. Inspect the generated Items or Filter(...) formula on the gallery
  3. Check for Lower(), exactin, Text() around OptionSet fields, or CountRows() on filtered tables
  4. Attempt to compile via canvas-authoring-compile_canvas — delegation warnings will appear

Expected Behavior

Creates and app leveraging filters that are delegable to Dataverse and enables evaluation against the full dataset regardless of record count.

Actual Behavior

Created an app with 23 instances of non-delegable Power Fx Formulas on one screen alone

Relevant Logs / Screenshots

Environment

Mac Tahoe 26.2
VS Code
GitHub Copilot
Sonnet 4.6
Dataverse as Datasource

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions