update handler

This commit is contained in:
Trowbridge 2019-02-27 20:34:59 -05:00
parent 77aa3c3366
commit 46f834a985

View File

@ -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