slicepicker

slicepicker, tile type

The slicepicker tile provides navigation controls to select a slice from the Slices table.

Example

table Parameters[p] = with
  [| as Product, as LeadTime, as Color |]
  [| "Pants", 12, "Blue" |]
  [| "Cap", 7, "Red" |]
  [| "T-shirt", 5, "White" |]

table Slices[slice] = slice by p title: Parameters.Product

show slicepicker "Product parameters" with
  same(Parameters.LeadTime) as "Lead time"
  same(Parameters.Color) as "Color"

show table "Selected product" slices: slice with
  Parameters.Product
  Parameters.LeadTime
  Parameters.Color

When the slice “Pants” is selected, the table shows:

Product LeadTime Color
Pants 12 Blue

Remarks

The slicepicker values must be scalar per slice, so selectors like same or single are typically used in the with body. Only tiles with a slices: option are affected by the current slice selection.

In the new dashboard layout, slicepicker supports block positioning such as show slicepicker "Product parameters" { 1..6, 1 }. In this positioned form, the tile does not accept a with body. The entries are taken from the title: and optional subtitle: arguments of the slice by table declaration. Put the selected slice details in a separate sliced tile, such as a show table tile with the slices: slice option.

StyleCode

For generic StyleCode rules, see stylecode.

User Contributed Notes
0 notes + add a note