Skip to content
MyAppBuilder
StableDataVersion 1

Gallery

Overview

A grid of pictures from an image field, with a full-screen viewer and arrow-key navigation. Perfect for job photos, portfolios and product shots.

When to use

  • Before/after photos on a job page
  • A portfolio page fed by a Projects entity
  • Product photo sets
  • Event photos uploaded by staff

When not to use

  • Records that need text alongside the picture: use Cards
  • Non-image files: use a Table or Detail View with Download actions

Quick start

  1. Add a Gallery and choose the entity in Properties → Data
  2. Set Image field (an Image, URL or File field with pictures) and optionally a Caption field
  3. Set Columns (4 is a good default; 2–3 on phones)
  4. Preview: click a picture to open the viewer; use arrows or ← → keys

Properties

Titletext (bindable)

Heading shown above the gallery. Leave empty for none. Bindable, so it can include dynamic text such as the customer's name.

Example: Open jobs

Empty-state texttext

Message shown when the query returns no records (after filters, search and permissions). Tell people what to do next: “No jobs yet — add one with the button above”.

Default: No images yet.

Image fieldfield (image, url, file)

Field holding the picture link(s). Records whose value is not a usable image link are skipped. When empty, the first Image field (then URL field) of the entity is used.

Caption fieldfield

Text shown under each thumbnail and in the viewer, e.g. the job name or a description.

Example: caption

Columnsnumber (1–8)

Thumbnails per row on wide screens; the grid drops columns automatically on narrow screens.

Default: 4

Data binding

An entity query; up to 300 records are loaded (set filters to narrow, e.g. job_id equals Page parameter id). Only the first image of a multi-image field is shown per record; add one record per photo for full sets.

Properties that can use dynamic data: Title, data.

Events

On row click
When actions are set, clicking a picture runs them (Event → record, Event → id) instead of opening the built-in viewer. Use it to navigate to the record's page.

Actions

Open the Actions tab in the inspector, pick an event and add actions such as Go to page, Create record or Show message. Actions run in order; data-changing actions run on the server with the signed-in user's permissions.

Responsive behavior

Square thumbnails reflow to fewer columns on phones; the viewer fits the screen.

Permissions

Records are filtered on the server by the current role's rules (for example customers only receive their own records) and hidden fields are removed before anything reaches the browser. Hiding this component does not protect the data; set permissions on the entity.

Accessibility

  • Thumbnails are buttons named “Open <caption>”
  • The viewer closes with Escape and traps focus on its close button

Examples

Job photos

Example
Page: /jobs/:id
Source: Job Photos where job_id equals Page parameter id · Sort: Created descending
Image field: photo · Caption field: note · Columns: 3

Common patterns

  • An Image Upload (Camera on phones) in a Form above the gallery that creates a Job Photo record
  • A Gallery inside a List is unnecessary; filter instead

Limitations

  • No built-in pagination beyond the 300-record limit
  • No captions editing or deletion from the viewer

Troubleshooting

“Gallery: choose an image field”

Fix: Set Image field, or add an Image field to the entity

Some pictures are missing

Why: The value is not a link (e.g. plain text), or the file is not an image

Fix: Fill the field with Image Upload or Camera

Related

Was this helpful?