Post

Power Apps gallery controls: how OnSelect determines click behavior

Diesen Beitrag auf Deutsch lesen

A clickable control inside a Power Apps gallery can run its own OnSelect formula instead of the gallery formula. Select(Parent) passes the click to the gallery.

TL;DR

In Power Apps galleries, a clickable control such as a button uses its own OnSelect formula when configured. Setting OnSelect to Select(Parent) makes the click behave like selecting the gallery, while a different formula takes precedence and can make gallery changes appear ineffective.

Original by Hardit Bhatia, on The Power Addict. Read the original

This is our own summary, not a republication or full translation.

Why it matters

  • Makers: Set a clickable control inside a gallery to Select(Parent) when it should follow the gallery behavior, and inspect the control's own OnSelect before changing the gallery formula.
  • Makers: Use the control-specific OnSelect when the button needs distinct behavior, because its formula takes precedence when that control is clicked and determines the resulting action.

Frequently asked questions

How does OnSelect work for a button inside a Power Apps gallery?

A button inside a gallery runs its own OnSelect formula when one is configured. That formula takes precedence over the gallery's OnSelect when clicked.

What does Select(Parent) do on a clickable control in a Power Apps gallery?

Select(Parent) makes the control click behave like selecting the gallery. This lets the gallery's OnSelect define the resulting action.

Why do changes to a Power Apps gallery OnSelect sometimes have no effect?

Changes have no effect when the clicked control contains its own different OnSelect formula. The control formula runs instead of the gallery formula.

This post is licensed under CC BY 4.0 by the author.