Skip to main content

AF Table AF Table


AF Table QueryAF-Table-Query


Input​

InputsTypeMandatoryDescription
PISystemstringY
DatabasestringY
TableNamestringY
FilterstringNCriteria used to filter the rows

payload

Output​

OutputsTypeDescriptionExample
object
Rowsint15
Dataarrayarray[15]
   0arrayarray[6]
      0object0
      1string""T-2015""
      2int200
      3int0.2
      4string""0.000296296""
      5string""Test""

Example Input Payload​

msg.payload = { 
"PISystem":env.get("TestSystem"),
"Database":env.get("TestDatabase"),
"TableName":"TestTable"
}

Example Flow​

		[
{
"id": "566cc59e53b5ee3e",
"type": "subflow",
"name": "TestADSNode_AFTableSelect",
"info": "",
"category": "",
"in": [
{
"x": 40,
"y": 80,
"wires": [
{
"id": "2e7e61d440d7805f"
}
]
}
],
"out": [
{
"x": 1520,
"y": 160,
"wires": [
{
"id": "534aa2b964d703d1",
"port": 0
}
]
}
],
"env": [
{
"name": "TestSystem",
"type": "str",
"value": "Dev-AF1"
},
{
"name": "TestDatabase",
"type": "str",
"value": "NodeTestCaseSource"
}
],
"meta": {},
"color": "#DDAA99"
},
{
"id": "534aa2b964d703d1",
"type": "AFCheckIn",
"z": "566cc59e53b5ee3e",
"name": "",
"x": 1390,
"y": 160,
"wires": [
[]
]
},
{
"id": "ff6f5969d980b819",
"type": "function",
"z": "566cc59e53b5ee3e",
"name": "CheckIn Config",
"func": "msg.payload = {};\nmsg.payload.PISystem = env.get(\"TestSystem\");\nmsg.payload.Database = env.get(\"TestDatabase\");\nmsg.payload.CheckInMode = \"ToMe\";\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1220,
"y": 160,
"wires": [
[
"534aa2b964d703d1"
]
]
},
{
"id": "3b7c32a4fde5074a",
"type": "debug",
"z": "566cc59e53b5ee3e",
"name": "select-table",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 930,
"y": 220,
"wires": []
},
{
"id": "defa018de7ad408f",
"type": "function",
"z": "566cc59e53b5ee3e",
"name": "RefreshTargetDatabases",
"func": "var server = env.get(\"TestSystem\");\nmsg.payload = {\n \"ItemType\":\"AFDatabases\",\n \"Input\":server\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 470,
"y": 120,
"wires": [
[
"fb6527d7bbe38217"
]
]
},
{
"id": "fb6527d7bbe38217",
"type": "afserver-information",
"z": "566cc59e53b5ee3e",
"name": "",
"x": 540,
"y": 160,
"wires": [
[
"77761b4f2d40b8be"
]
]
},
{
"id": "77761b4f2d40b8be",
"type": "function",
"z": "566cc59e53b5ee3e",
"name": "Payload",
"func": "msg.payload = {\t\t\n \"PISystem\":env.get(\"TestSystem\"),\t\n \"Database\":env.get(\"TestDatabase\"),\t\n \"TableName\":\"TestTable1\"\t\n}\t\t\n\t\t\nreturn msg;\t\t",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 780,
"y": 160,
"wires": [
[
"e20cce432f2435db"
]
]
},
{
"id": "2e7e61d440d7805f",
"type": "function",
"z": "566cc59e53b5ee3e",
"name": "Get and refresh servers",
"func": "msg.payload = {\"ItemType\":\"AFServers\",\"Input\":\"\"};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 190,
"y": 80,
"wires": [
[
"50dc5cf30e587c92"
]
]
},
{
"id": "50dc5cf30e587c92",
"type": "afserver-information",
"z": "566cc59e53b5ee3e",
"name": "",
"x": 240,
"y": 120,
"wires": [
[
"defa018de7ad408f"
]
]
},
{
"id": "e20cce432f2435db",
"type": "AFTableSelect",
"z": "566cc59e53b5ee3e",
"name": "",
"PISystem": "",
"Database": "",
"TableName": "",
"Filter": "",
"x": 980,
"y": 160,
"wires": [
[
"ff6f5969d980b819",
"3b7c32a4fde5074a"
]
]
},
{
"id": "b40db23e2bd1a77b",
"type": "subflow:566cc59e53b5ee3e",
"z": "c0fb79cc88455a9c",
"name": "",
"env": [],
"x": 580,
"y": 700,
"wires": [
[
"77864be8288b4f8b"
]
]
}
]