When you describe an analyzer in plain English, the AI generates a JavaScript module that inspects your Power Apps Canvas app. This page is written for Power Fx developers: it describes — in familiar terms — exactly what the analyzer can “see” and therefore what you can ask it to check. If you want the raw JavaScript surface instead, see the Analyzer Data Reference.
Set, UpdateContext)Collect, ClearCollect)Navigate, Back)The analyzer gets a flat list of every screen, component definition, component instance, and control in the app — same hierarchy you see in the Studio tree view. For each one you know:
btnSubmit).Button, Gallery, Label,
ComboBox, Screen, CanvasComponent, etc. Classic and modern
(Fluent) variants are both recognized.Ask things like:
Button controls that have no AccessibleLabel set.”
Every property that starts with = in the YAML is captured as a formula — that includes
OnSelect, Items, Visible, Text, Default,
OnStart, BorderColor, and everything else. The analyzer sees:
Ask things like:
LookUp or Filter on a non-delegable
column (e.g. StartsWith, Mid).”If expressions nested more than three levels deep.”OnSelect properties that are empty, whitespace, false, or
just Select(Parent).”Color.RGBA / ColorValue) instead
of a theme variable.”Patch calls that are missing an error handler (IfError).”Set() and UpdateContext()
Every Set() (global) and UpdateContext() (context / screen-scoped) call is
already parsed and grouped by variable name. For every variable you get the list of places it’s
written, and a separate flag for whether it’s ever read in any formula.
Ask things like:
Set but never read (dead state).”is, has, can)
that are assigned non-boolean values.”Set calls inside a loop-y ForAll.”Collect() and ClearCollect()
Same story as variables: every collection mutation is grouped by collection name, and the analyzer
knows whether that collection is consumed anywhere (as a gallery Items, in a
LookUp, ForAll, CountRows, and so on).
Ask things like:
Collected or ClearCollected but never
read — the app is filling them for nothing.”With record
instead.”Collect calls inside a gallery template.”The analyzer builds a reverse index of which controls are referenced where, including:
TextInput1.Text, Gallery1.Selected (the
strongest signal a control is actually used).Select(btnSubmit), Reset(txtEmail).Ask things like:
Select(X) / Reset(X) calls where X no longer
exists as a control (stale reference).”App.Formulas that nothing calls.”Canvas components are seen in two forms: the definition (with its custom input/output properties) and every instance placed on a screen. The analyzer knows which definition each instance belongs to, so it can cross-check the two.
Ask things like:
OnStart, Formulas, StartScreen
The App node exposes its own formulas just like any other control: OnStart,
OnError, Formulas (named formulas), StartScreen, etc. Named
formulas are indexed by name so you can tell which ones are actually referenced.
Ask things like:
OnStart longer than 30 statements — it’s a startup bottleneck.”Set() calls in OnStart whose value is static (no table
reads, no User(), no Now()) — they could be named formulas.”App.Formulas that no formula ever references.”If in StartScreen — routing logic belongs in a
named formula.”The analyzer works against the unpacked Canvas app source — so anything that lives outside that is off-limits. Be sure your prompt doesn’t ask for:
OnSelect slow?”. Static patterns only.Filter calls on a SharePoint list that use StartsWith or
Search without delegation” gives the AI enough to generate useful code.resultSchema and the report table.