Browse the docs

Read a panel

Reads what is entered in a panel that is showing: its fields, toggles, sliders, pickers and chosen table rows.

Read panel id

Details #

Returns {values, button} for the panel with that id. values is every view with an id that holds a value, by id, exactly as the panel step would answer; button is the last button pressed that left the panel up (a button with close: false), and is null until one was.

What it reads is the panel's own state, not what happens to be drawn, so text typed a moment ago is there. Changes waiting for the next frame are applied first.

If no panel has that id, the step fails with "no panel called 'dl' is showing; it may have been closed".

Parameters #

ParameterTypeRequiredValuesWhat it does
idtextYesThe panel's id.
intotextThe variable that receives {values, button}.

Every step also accepts label, onFailure, timeout and dryRunSafe.

Examples #

Wait for a note, then read it
Do
  1. Show panel “Note” and carry on
  2. Wait 5 s
  3. Read panel “ask” into got
  4. Show “{{ got.values.note }}”
  5. Close panel “ask”
Open in Switchboard to try it

See also #

Show a panel, Update a panel, Close a panel