Skip to content

Trigger

trigger

Description

Presents the user with a button that can trigger an attachment action or open a wiki page.

Attributes

  • title
  • $capture.trigger: camera | photo | video | wiki | library | layout
  • $capture.wiki: id of the wiki page to open (if wiki)
  • $capture.attachmentCount: number to consider done or -1 for no limit
  • $capture.opts: options for layout; should include at least id

Example 1

{
  "type": "string",
  "$capture": {
    "as": "trigger",
    "trigger": "wiki",
    "wiki": "39dcd75d-b7ab-4094-b85c-450590b48cbc"
  },
  "$display": {},
  "title": "Trigger metric"
}

Example 2

{
  "title": "Less than 60%",
  "type": "trigger",
  "$capture": {
    "rule": {
      "setting": "rule",
      "text": "(values.topPeakflowMorning exists and values.topPeakflowNight exists) and (values.topPeakflowMorning < values.standard_peakflow_60 or values.topPeakflowNight < values.standard_peakflow_60)"
    },
    "as": "trigger",
    "trigger": "layout",
    "opts": {
      "id": "4e342b4d-acd5-4081-a95b-712c0fa5601c"
    }
  },
  "$display": {
    "rule": {
      "setting": "never"
    }
  },
  "$ref": "$.score.peakflowScore_60"
}