Skip to content

Data binding

  • id: unique id for the data source
  • query: query to use; supports templates
  • refresh: items to trigger refresh on; save | delete | action | latest
  • kind: script type, dispatch, user, script default to dispatch

Script action

Ensure to provide at least script handle in the options parameter. Past any parameters that the script required in the options parameter. You can use expression in the parameter as they will be evaluated using the context dispatch.

Dispatch example

  "data": {
    "sources": [
      {
        "id": "creatorStatus",
        "query": "current user, given service [creator-status]",
        "refresh": []
      }
    ]
  }

Script example

Assume that the script returned

{
  "message": "hello world"
}
{
  "data": {
    "sources": [
      {
        "id": "pastActions",
        "kind": "script",
        "options": {
          "handle": "task-past-actions",
          "startDate": "2022-09-27",
          "date": "{#now | date:YYYY-MM-DD}"
        }
      }
    ]
  },
  "ux": {
    "component": "text",
    "text": "{$source.pastActions.data.message}"
  }
}