Overview

Another variant of apiAction, this action allows you to call a ClearProcess API based on a clicked hyperlink in a row of a DataTable. Valid page components for this action are:

  • DataTable – you can add an ActionLink to a column and then assign an action to the onClick property of the ActionLink

Properties

PropertyDescription
actionSet this to “apiFromRow” to use this action.
apiThe name of the ClearProcess API to be called.
columnsThe columns from the row whose values should be passed to the ClearProcess API.
successActionsAn array of actions to be called if the API returns no error messages.
errorActionsAn array of actions to be called if the API returns error messages.

Example

Add the following to your component:

"component": {
  "name": "ActionLink",
  "onClick": [
    {
      "action": "apiFromRow",
      "api": "GetFileAttachment",
      "columns": [
        "ATTA_ID"
      ],
      "successActions": [
        {
          "action": "changeMode",
          "parameters": {
            "mode": "display"
          }
        },
        {
          "name": "setIn",
           "parameters": {
              "value": {},
              "key": [
                "user_parameters"
              ]
           }
        }
      ],
      "errorActions": [
        {
          "action": "showModal",
          "name": "errorMessages"
        }
      ]
    }
  ]
}