Please enable JavaScript to view this site.

QPR Knowledge Base 2019.1

Navigation: Developer's Guide > QPR Scripting > Example Scripts

Change Series Symbols from "Actual" to "Act"

Scroll Prev Top Next More

<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