Skip to main content

AF Table AF Table


AF Table ActionAF-Table-Action


Input​

| Inputs | Type | Mandatory | Description |
| --- | --- | --- | --- |
| TableElements | array | Y | |
|    PISystem | string | Y | |
|    Database | string | Y | |
|    TableName | string | Y | |
|    Filter | dynamic | N | |
|    Action | string | Y | {Insert, Delete, Update, Merge} |
|    UseFirstColumnPrimaryKey | bool | N | |
|    Values | array | Y | Array of Row Values |

Output​

| Outputs | Type | Description | Example |
| --- | --- | --- | --- |
| array[1] | | | array |
|    0 | | | object |
|    Action | string | | ""Inserted Row"" |
|    Row | array | | array[2] |
|    0 | object | | 1 |
|    1 | string | | ""T-2024"" |

Example Input Payload​

msg.payload = {
    "TableElements": [
        {
            "PISystem": env.get("TestSystem"),
            "Database": env.get("TestDatabase"),
            "TableName": "TestTable",
            "UseFirstColumnPrimaryKey": true,
            "Filter": 0,
            "Action": "INSERT",
            "Values": [
                1,
                "T-2024",
               
            ]
        }
    ]
}
return msg;

Example Flow​

[
{
"id": "07b56f473c442db8",
"type": "AF Table Actions",
"z": "bd961522decc58ab",
"name": "",
"PISystem": "",
"Database": "",
"TableName": "",
"Action": "",
"x": 290,
"y": 200,
"wires": [
[]
]
}
]