Skip to content

Develop panel loop question #10924

@andrewtelnov

Description

@andrewtelnov

We need a new "Panel Loop" question type that combines Panel Dynamic behavior with data shape similar to Matrix Dropdown. Key points:

Overview

Panel Loop uses data structured like Matrix Dropdown (an array of ItemValue-like entries), but functions like Panel Dynamic.
Unlike Panel Dynamic, Panel Loop does not allow add/remove panels during runtime; the panel set is fixed.
All other behaviors and features should match Panel Dynamic.
Data/property model

Expose a property (suggested name: panelsList or panelsSource) that is an array of ItemValue instances (analogous to Matrix Dropdown’s rows). Avoid naming conflicts with Panel instances.
The property must be configurable in the editor as itemvalue[] and also accept values supplied via carry-forward.
Loop (single-input) mode features
When displayed in loop (single-input) mode, the question iterates through panels one at a time. Add the following configurable properties:

  • maxLoops: integer (0 = answer all panels; >0 = maximum panels to present)
  • randomizePanels: boolean — randomize order of non-prioritized panels
  • prioritizedValues: array — values that must be included in the loop regardless of maxLoops (always shown)
  • finishCurrentLoopExpression: expression — when true, finish the current panel loop iteration
  • finishAllLoopsExpression: expression — when true, stop all remaining loops for this question
  • showInLoopEvenIfSurveyNotLooping: boolean — allow loop presentation even when survey-level loop mode is disabled

Behavior details

Panel set is derived from panelsSource and is immutable at runtime (no add/remove).
Randomization respects prioritizedValues (these remain included and can be pinned to top if desired).
maxLoops limits how many panels are presented; prioritizedValues count toward that limit.
Expression properties are evaluated per iteration to control flow.
Support reproducible randomization (seed) and validation to ensure prioritized items and constraints are respected.
Editor UX notes

panelsSource editable as itemvalue[] in the editor.
Allow binding panelsSource via carry-forward or data expressions.
Expose loop controls and expressions in the question property panel.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions