Message from Px5

Example

After changing the value on the Px5 form:

{
"currentpxform": "Px5 Form Name",
"currentpxtab": "Tab 1",
"method": "ValueChangedInPx5",
"payload": {
"controlname": "input1",
"value": "Value of input1",
"type": "pxText"
}
}

Example

After MessageToPx5 with method "GetControlsFromPx5":

{
"currentpxform": "Px5 Form Name",
"currentpxtab": "Tab 1",
"method": "GetControlsFromPx5",
"payload": [
{ "controlname": "input1", "value": "Value of input1", "type": "pxText" },
{ "controlname": "input2", "value": "Value of input2", "type": "pxText" },
{ "controlname": "input3", "value": 12.5, "type": "pxCurrency" },
{ "controlname": "input2", "value": false, "type": "pxCheck" }
]
}

Example

After MessageToPx5 with method "GetInfoFromPx5":

{
"pxform": "Px5 Form Name",
"currentpxtab": "Tab 1",
"method": "GetInfoFromPx5",
"payload": {
"pxversion": "PxVersion",
"dbname": "DBName",
"dbpath": "DBPath",
"dbuser": "DBUser",
"loginuser": "LoginUser",
"logingroup": "LoginGroup",
"readonly": false,
"connectionstring": "ConnectionString",
"skin": "Skin",
"restapiurl": "RESTAPIURL",
"webservicepassword": "WebservicePassword",
"logintoken": "LoginToken"
}
}

Example

Error if control (changing value or triggering action) is not found:

{
"currentpxform": "Px5 Form Name",
"currentpxtab": "Tab 1",
"method": "MessageErrorInPx5",
"payload": {
"origin": "{\"currentpxform\":\"Px5 Form Name\",\"currentpxtab\": \"Tab 1\", ...",
"errortype": "NotFound",
"errormsg": "Human readable error message from Px5"
}
}

Hierarchy

  • MessageFromPx5

Properties

currentpxform: string

Current form in Px5

currentpxtab: null | string

Visible caption of current tab in Px5 (if tabs are avaiable)

method: "GetControlsFromPx5" | "GetInfoFromPx5" | "ValueChangedInPx5" | "TabSwitchedInPx5" | "MessageErrorInPx5"

Method of the message:

  • GetControlsFromPx5: Contains values from all Px5 controls, payload: array of GetInputValueFromPx5Payload, triggered by method "GetControlsFromPx5"
  • GetInfoFromPx5: Contains infos from Px5, payload: GetInfoFromPx5Payload, triggered by method "GetInfoFromPx5"
  • ValueChangedInPx5: Contains value of last changed Px5 control, payload: GetInputValueFromPx5Payload, triggered by Px5 on leaving control
  • TabSwitchedInPx5: Contains no payload, payload: null (see currentpxtab), triggered by Px5 after switching a tab

Payload of the message: