Copy paste perspective table

When using the copy function of a perspective table it will copy the JSON of a row.
When this is pasted in an email, the data isn't shown logically to other people.
Is there a way to make the copy function copy the data and transform it to a table format that works for an email (or Word document for example).

Try exporting the data using this function:
https://docs.inductiveautomation.com/display/DOC81/system.dataset.exportExcel

1 Like

Still on the backlog :frowning_face:

I do get this but I want to use the clipboard instead of exporting.

Is there a possibility to create your 'own' copy function with a button?
Which takes this JSON and transforms it to HTML code and sets this HTML to you're clipboard so you can paste it in Outlook?

this js injection markdown allows you to copy text to the clipboard. This might require your client to accept clipboard access though. Also requires https and proabbly doesnt work all browsers. only testsed on chrome

you'll have to write the bindings value to something usefull yourself, best to write to a custom component only filled by the button or something. and clear this property after this code so it doesnt accidantly fill up the clipboard when unwanted

[
  {
    "type": "ia.display.markdown",
    "version": 0,
    "props": {
      "markdown": {
        "escapeHtml": false
      }
    },
    "meta": {
      "name": "Markdown"
    },
    "position": {
      "x": 288,
      "y": 373,
      "height": 200,
      "width": 200
    },
    "custom": {},
    "propConfig": {
      "props.source": {
        "binding": {
          "type": "expr",
          "config": {
            "expression": "{../TextField.props.text}"
          },
          "transforms": [
            {
              "code": "\t\n\tif not value: return \"\"\n\t\n\tcode =  \"\"\"<img style='display:none' src='/favicon.ico' onload=\\\"\n\t\tnavigator.clipboard.writeText('\"\"\"+value+\"\"\"');\n\t\t\t\t\n\t\\\"></img>\"\"\".replace(\"\\n\", \"\").replace(\"\\t\", \"\")\n\treturn code\n\t",
              "type": "script"
            }
          ]
        }
      }
    }
  }
]