Overview

A variant of apiAction, this action allows you to call a ClearProcess API based on rows currently selected in a DataTable. Valid page components for this action are:

  • ActionButton – use the onClick property.

Properties

PropertyDescription
actionSet this to “apiFromSelected” to use this action.
apiThe name of the ClearProcess API to be called.
nameThe name of the DataTable whose selected rows will be passed to ClearProcess.
keyThe name to be assigned to the data passed to ClearProcess.
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:

"onClick": [
  {
    "action": "apiFromSelected",
    "api": "ApprovePurchaseOrders",
    "name": "WORKLIST".
    "key": "TO_BE_APPROVED", 
    "successActions": [
      {
        "action": "changeMode",
        "parameters": {
          "mode": "display"
        }
      },
      {
        "name": "setIn",
         "parameters": {
            "value": {},
            "key": [
              "user_parameters"
            ]
         }
      }
    ],
    "errorActions": [
      {
        "action": "showModal",
        "name": "errorMessages"
      }
    ]
  }
]