Allow getting the list of changes for director or segment pools.
This commit is contained in:
parent
2c46764be2
commit
2df666a44f
@ -19,10 +19,10 @@ Private Sub UserForm_Activate()
|
||||
tbPrint.value = ""
|
||||
|
||||
Dim errorMsg As String
|
||||
X = handler.list_changes("{""scenario"":{""quota_rep_descr"":""" & shData.Cells(2, 5) & """}}", errorMsg)
|
||||
X = handler.list_changes(errorMsg)
|
||||
If errorMsg <> "" Then
|
||||
Unload Me
|
||||
MsgBox "No adjustments have been made.", vbOKOnly + vbExclamation, errorMsg
|
||||
MsgBox errorMsg, vbOKOnly + vbExclamation, "No data found."
|
||||
End
|
||||
End If
|
||||
Me.lbHist.list = X
|
||||
|
||||
Binary file not shown.
@ -14,7 +14,6 @@ Public basis() As Variant
|
||||
Public baseline() As Variant
|
||||
Public adjust() As Variant
|
||||
|
||||
|
||||
Sub load_fpvt()
|
||||
|
||||
Application.StatusBar = "retrieving selection data....."
|
||||
@ -48,8 +47,10 @@ Sub pg_main_workset(catg As String, rep As String)
|
||||
Dim errorMsg As String
|
||||
Application.StatusBar = "Querying for " & rep & "'s pool of data..."
|
||||
|
||||
shConfig.Range("current_pool").value = "{""scenario"":{""" & catg & """:""" & rep & """}}"
|
||||
|
||||
Dim json As Object
|
||||
Set json = makeHttpRequest("GET", "get_pool", "{""scenario"":{""" & catg & """:""" & rep & """}}", errorMsg)
|
||||
Set json = makeHttpRequest("GET", "get_pool", shConfig.Range("current_pool").value, errorMsg)
|
||||
|
||||
If errorMsg <> "" Then
|
||||
MsgBox errorMsg, vbOKOnly + vbExclamation, "Couldn't " & rep & "'s pool of data."
|
||||
@ -378,9 +379,14 @@ Function co_num(ByRef one As Variant, ByRef two As Variant) As Variant
|
||||
End Function
|
||||
|
||||
|
||||
Function list_changes(doc As String, ByRef errorMsg As String) As Variant()
|
||||
Function list_changes(ByRef errorMsg As String) As Variant()
|
||||
If shConfig.Range("current_pool").value = "" Then
|
||||
errorMsg = "Nothing to undo. Load some data with the folder icon first."
|
||||
Exit Function
|
||||
End If
|
||||
|
||||
Dim json As Object
|
||||
Set json = makeHttpRequest("GET", "list_changes", doc, errorMsg)
|
||||
Set json = makeHttpRequest("GET", "list_changes", shConfig.Range("current_pool").value, errorMsg)
|
||||
|
||||
If errorMsg <> "" Then
|
||||
Exit Function
|
||||
|
||||
Loading…
Reference in New Issue
Block a user