For those interested the msg Structure is as follows. I originally was going to use the msg.Count to loop through SMT, but since I did not understand the correct Syntax I ended up using a Split Node and writing to msg.Context
{
"payload": {
"trans_num": 78511016,
"trans_type": "S",
"trans_date": "2024-01-02T00:00:00.000Z",
"item": "FSB36-SD24-MB",
"qty": -1,
"whse": "MAIN",
"loc": "HC00298883",
"ref_type": "O",
"ref_num": "HC00298883",
"ref_line_suf": 10,
"cost": 26.77318,
"user_code": null,
"lot": null,
"ref_release": 0,
"reason_code": null,
"backflush": 0,
"wc": null,
"awaiting_eop": 0,
"matl_cost": 26.77318,
"lbr_cost": 0,
"fovhd_cost": 0,
"vovhd_cost": 0,
"out_cost": 0,
"cost_code": null,
"NoteExistsFlag": 0,
"RecordDate": "2024-01-02T09:31:15.567Z",
"RowPointer": "5FAB8DC4-370F-4AF7-B5EF-CA9BD61A2C7F",
"CreatedBy": "$service",
"UpdatedBy": "$service",
"CreateDate": "2024-01-02T09:31:15.567Z",
"InWorkflow": 0,
"document_num": null,
"import_doc_id": null,
"uf_jit_reference": null,
"count_sequence": null,
"Uf_Trans_Num": null,
"Uf_JE_Customer": null,
"uf_jit_DocID": "",
"uf_jit_DocLine": "",
"uf_jit_parent": "",
"uf_jit_QAID": "",
"uf_co_number": "",
"uf_user": "",
"emp_num": null,
"job_lot": null,
"job_ser_num": null,
"uf_IdealReference": null,
"uf_WMSTransNum": null
},
"topic": "",
"query": "SELECT top 2 mt.* \r\nFROM dbo.matltran mt\r\nJOIN dbo.item i ON i.item = mt.Item\r\nWHERE mt.uf_WMSTransNum IS NULL AND mt.trans_date > '01/01/24' and mt.whse = 'MAIN'\r\nORDER BY mt.trans_date ",
"queryMode": "query",
"queryParams": [],
"sqlInfo": [],
"SMT": [
{
"trans_num": 78511015,
"trans_type": "S",
"trans_date": "2024-01-02T00:00:00.000Z",
"item": "FSB36-GMB",
"qty": -1,
"whse": "MAIN",
"loc": "HC00298883",
"ref_type": "O",
"ref_num": "HC00298883",
"ref_line_suf": 9,
"cost": 82.15359,
"user_code": null,
"lot": null,
"ref_release": 0,
"reason_code": null,
"backflush": 0,
"wc": null,
"awaiting_eop": 0,
"matl_cost": 82.15359,
"lbr_cost": 0,
"fovhd_cost": 0,
"vovhd_cost": 0,
"out_cost": 0,
"cost_code": null,
"NoteExistsFlag": 0,
"RecordDate": "2024-01-02T09:31:13.753Z",
"RowPointer": "033B56BC-09FB-4812-A399-F3F341B8A6C2",
"CreatedBy": "$service",
"UpdatedBy": "$service",
"CreateDate": "2024-01-02T09:31:13.753Z",
"InWorkflow": 0,
"document_num": null,
"import_doc_id": null,
"uf_jit_reference": null,
"count_sequence": null,
"Uf_Trans_Num": null,
"Uf_JE_Customer": null,
"uf_jit_DocID": "",
"uf_jit_DocLine": "",
"uf_jit_parent": "",
"uf_jit_QAID": "",
"uf_co_number": "",
"uf_user": "",
"emp_num": null,
"job_lot": null,
"job_ser_num": null,
"uf_IdealReference": null,
"uf_WMSTransNum": null
},
{
"trans_num": 78511016,
"trans_type": "S",
"trans_date": "2024-01-02T00:00:00.000Z",
"item": "FSB36-SD24-MB",
"qty": -1,
"whse": "MAIN",
"loc": "HC00298883",
"ref_type": "O",
"ref_num": "HC00298883",
"ref_line_suf": 10,
"cost": 26.77318,
"user_code": null,
"lot": null,
"ref_release": 0,
"reason_code": null,
"backflush": 0,
"wc": null,
"awaiting_eop": 0,
"matl_cost": 26.77318,
"lbr_cost": 0,
"fovhd_cost": 0,
"vovhd_cost": 0,
"out_cost": 0,
"cost_code": null,
"NoteExistsFlag": 0,
"RecordDate": "2024-01-02T09:31:15.567Z",
"RowPointer": "5FAB8DC4-370F-4AF7-B5EF-CA9BD61A2C7F",
"CreatedBy": "$service",
"UpdatedBy": "$service",
"CreateDate": "2024-01-02T09:31:15.567Z",
"InWorkflow": 0,
"document_num": null,
"import_doc_id": null,
"uf_jit_reference": null,
"count_sequence": null,
"Uf_Trans_Num": null,
"Uf_JE_Customer": null,
"uf_jit_DocID": "",
"uf_jit_DocLine": "",
"uf_jit_parent": "",
"uf_jit_QAID": "",
"uf_co_number": "",
"uf_user": "",
"emp_num": null,
"job_lot": null,
"job_ser_num": null,
"uf_IdealReference": null,
"uf_WMSTransNum": null
}
],
"parts": {
"id": "5ee43869b269c348",
"type": "array",
"count": 2,
"len": 1,
"index": 1
},
"_msgid": "a5eb9f7d20828072",
"Count": 1,
"Context": {
"trans_num": 78511016,
"trans_type": "S",
"trans_date": "2024-01-02T00:00:00.000Z",
"item": "FSB36-SD24-MB",
"qty": -1,
"whse": "MAIN",
"loc": "HC00298883",
"ref_type": "O",
"ref_num": "HC00298883",
"ref_line_suf": 10,
"cost": 26.77318,
"user_code": null,
"lot": null,
"ref_release": 0,
"reason_code": null,
"backflush": 0,
"wc": null,
"awaiting_eop": 0,
"matl_cost": 26.77318,
"lbr_cost": 0,
"fovhd_cost": 0,
"vovhd_cost": 0,
"out_cost": 0,
"cost_code": null,
"NoteExistsFlag": 0,
"RecordDate": "2024-01-02T09:31:15.567Z",
"RowPointer": "5FAB8DC4-370F-4AF7-B5EF-CA9BD61A2C7F",
"CreatedBy": "$service",
"UpdatedBy": "$service",
"CreateDate": "2024-01-02T09:31:15.567Z",
"InWorkflow": 0,
"document_num": null,
"import_doc_id": null,
"uf_jit_reference": null,
"count_sequence": null,
"Uf_Trans_Num": null,
"Uf_JE_Customer": null,
"uf_jit_DocID": "",
"uf_jit_DocLine": "",
"uf_jit_parent": "",
"uf_jit_QAID": "",
"uf_co_number": "",
"uf_user": "",
"emp_num": null,
"job_lot": null,
"job_ser_num": null,
"uf_IdealReference": null,
"uf_WMSTransNum": null
}
}