QPR Knowledge Base 2019.1

Change Series Symbols from "Actual" to "Act"

Change Series Symbols from "Actual" to "Act"

Previous topic Next topic  

Change Series Symbols from "Actual" to "Act"

Previous topic Next topic  

<QPR_SCRIPT_FILE language = vbscript>

Option Explicit

 

Sub Main()

 

 Dim oModel

 Dim SCError

 

 'do not authenticate, use already logged user instead

 SCError=SCApplication.OpenModel("Dentorex Group Scorecard", oModel)

 if SCError <> 0 then Exit Sub

 

 Dim SeriesArray

 

 SCError=oModel.GetElements("Series", SeriesArray)

 If SCError <> 0 then Exit Sub

 

 Dim Symbol

 Dim I

 

 For I = Lbound(SeriesArray,2) + 1 to Ubound(SeriesArray,2)  'first row has headers

   SCError=oModel.GetProperty(SeriesArray(I,1), "Symbol", Symbol)

       

   If SCError <> 0 then Exit For

   If Symbol="Actual" then

     SCError=oModel.SetProperty(SeriesArray(I,1), "Symbol", "Act")

     If SCError <> 0 then Exit For

   End If

 Next

 

End Sub