Skip to content

Switch

switch

Description

Allow user to select value from the schedule and additional attributes are fed into the tracker.

Attributes

  • default: provide a default value
  • $capture.path: provide a data source path
  • $capture.display: "hide" | "show"
  • $capture.rule: provide a rule setting
  • $data: provide a key/value pair data to display within a dispatches.
    • source: [Array of Object]
    • value: provide a process value
    • display: provide a display values
    • icon:
    • color:

Example

{
  "type": "string",
  "$capture": {
    "as": "switch",
    "path": "source",
    "display": "hide"
  },
  "$display": {},
  "title": "Switch attr",
  "$data": {
    "source": [
      {
        "display": "Apple",
        "value": "1",
        "tableData": {
          "id": 0
        }
      },
      {
        "display": "Orange",
        "value": "2",
        "tableData": {
          "id": 1
        }
      }
    ]
  },
  "default": "Pear"
}