slicetree

slicetree, tile type

The slicetree tile provides a hierarchical slice selector.

Example

table P = with
  [| as Family, as Subfamily, as Product, as Price |]
  [| "Garment", "Clothing", "Pant", 25 |]
  [| "Garment", "Clothing", "Shirt", 15 |]
  [| "Garment", "Accessory", "Hat", 12 |]
  [| "Home", "Furniture", "Table", 75 |]

table Slices[slice] = slice by P.Product title: P.Product

Slices.Family = same(P.Family)
Slices.Subfamily = same(P.Subfamily)
Slices.Product = same(P.Product)

show slicetree "Product tree" with
  Slices.Family
  Slices.Subfamily
  Slices.Product

show table "Selected product" slices: slice with
  P.Product
  P.Price

When the tree selection is “Garment > Clothing > Pant”, the table shows:

Product Price
Pant 25

Remarks

Each extra vector adds one level to the hierarchy. The order by tile option can be used to control the ordering of the tree levels.

User Contributed Notes
0 notes + add a note