From 46f834a985e06434869af0a8c465ee938ecc9715 Mon Sep 17 00:00:00 2001 From: Trowbridge Date: Wed, 27 Feb 2019 20:34:59 -0500 Subject: [PATCH] update handler --- handler.bas | 51 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/handler.bas b/handler.bas index 13392b6..1ac1b3d 100644 --- a/handler.bas +++ b/handler.bas @@ -80,9 +80,11 @@ Sub pg_main_workset() Dim wr As String Dim json As Object Dim i As Long + Dim j As Long Dim doc As String + Dim res() As Variant - doc = "{""quota_rep"":""50200 - DORAN MARABLE""}" + doc = "{""quota_rep"":""13025 - JAMES REGER""}" With req '.Open "GET", "http://10.56.1.15:3000/get_pool", True @@ -93,12 +95,47 @@ Sub pg_main_workset() wr = .ResponseText End With - Set json = JsonConverter.ParseJson(wr) + ReDim res(json("x").Count, 32) + + For i = 0 To UBound(res, 1) + res(i, 0) = json("x")(i + 1)("bill_cust_descr") + res(i, 1) = json("x")(i + 1)("billto_group") + res(i, 2) = json("x")(i + 1)("ship_cust_descr") + res(i, 3) = json("x")(i + 1)("shipto_group") + res(i, 4) = json("x")(i + 1)("quota_rep_descr") + res(i, 5) = json("x")(i + 1)("director_descr") + res(i, 6) = json("x")(i + 1)("segm") + res(i, 7) = json("x")(i + 1)("mod_chan") + res(i, 8) = json("x")(i + 1)("mod_chansub") + res(i, 9) = json("x")(i + 1)("majg_descr") + res(i, 10) = json("x")(i + 1)("ming_descr") + res(i, 11) = json("x")(i + 1)("majs_descr") + res(i, 12) = json("x")(i + 1)("mins_descr") + res(i, 13) = json("x")(i + 1)("brand") + res(i, 14) = json("x")(i + 1)("part_family") + res(i, 15) = json("x")(i + 1)("part_group") + res(i, 16) = json("x")(i + 1)("branding") + res(i, 17) = json("x")(i + 1)("color") + res(i, 18) = json("x")(i + 1)("part_descr") + res(i, 19) = json("x")(i + 1)("order_season") + res(i, 20) = json("x")(i + 1)("order_month") + res(i, 21) = json("x")(i + 1)("ship_season") + res(i, 22) = json("x")(i + 1)("ship_month") + res(i, 23) = json("x")(i + 1)("request_season") + res(i, 24) = json("x")(i + 1)("request_month") + res(i, 25) = json("x")(i + 1)("promo") + res(i, 26) = json("x")(i + 1)("version") + res(i, 27) = json("x")(i + 1)("iter") + res(i, 28) = json("x")(i + 1)("value_loc") + res(i, 29) = json("x")(i + 1)("value_usd") + res(i, 30) = json("x")(i + 1)("cost_loc") + res(i, 31) = json("x")(i + 1)("cust_usd") + res(i, 32) = json("x")(i + 1)("units") + Next i + + Set json = Nothing + -End Sub - - - - +End Sub \ No newline at end of file