Trigger workflow from Table Cell

Hi,

is there a way to integrate a Button into a table column so that clicking it will trigger an endpoint for the respective row it was clicked in?

The Navigation Cell Custom Component seems to be able to what i want, but can only navigate to other pages and not trigger an endpoint, right?

image

The goal is to use the Publish-Button, work with the current status and other Row information inside a workflow and then update the Table based on that.

Best :slight_smile:

Hello Franziska,

for this usecase we have native “action columns” in tables which can be configured to execute a WF / PL or function via an endpoint.
Example Action column:

{
        "name": "actions",
        "width": "20%",
        "label": "Add to Cart",
        "type": "actions",
        "actions": [
          {
            "type": "endpoint",
            "icon": "run", //run
            "label": "Add to cart",
            "endpoint": "fibonacci",
            "variableAssignments": [
              {
                "variableValueColumn": "Country",
                "variableType": "STRING",
                "variableName": "test"
              }
            ]
          }
        ]
      }

Example endpoint:

{
  "id": "fibonacci",
  "type": "function",
  "config": {
    "functionId": "2c8e21d3-a1e0-4931-9524-d5c11c8d6c67",
    "payload": {
      "input": {
        "name": "test",
        "$name": {
          "type": "string",
          "value": "{{test_var}}"
        }
      }
    }
  }
}

Documentation can be also found here: https://internal.onedata.de/apps/apps-docs/odml-documentation/AppBuilder/elements/TableElement.html#action-columns

Best Thommy