Highlighted
Davor Matijasevic Contributor.
Contributor.
395 views

Problems with VBS Threshold limit script

Jump to solution

I'm having problems with entering a VB script as a threshold script. It looks fine to me but when I close the dialog, I'm still getting a little red x in the dialog bottom right corner with tooltip "This field must not be empty. Specify a valid value." What am I missing? I can't find any official examples of the VB scripts.

Since this is my first venture into "thresholding by scripts", the script is nothing but me getting familiar with how things work. You can find it below:

Set nbiSource = Policy.Source("XYZ")
Dim msgText = "policy name = " & Policy.Name()
Dim instanceCounter = 0
While( instanceCounter < nbiSource.InstanceCount() )
  msgText = msgText & " instance " & instanceCounter & ": " & nbiSource.NameOf(instanceCounter) & "(" & nbiSource.ValueOf(instanceCounter) & ")"
  instanceCounter = instanceCounter + 1
Wend
 
ConsoleMessage.MsgText = msgText
ConsoleMessage.Severity = "Normal"
ConsoleMessage.Application = "Test"
ConsoleMessage.Send()
 
Rule.Status = false

 

0 Likes
1 Solution

Accepted Solutions
Davor Matijasevic Contributor.
Contributor.

Re: Problems with VBS Threshold limit script

Jump to solution

Gave up on VB, switched to Perl.

0 Likes
1 Reply
Davor Matijasevic Contributor.
Contributor.

Re: Problems with VBS Threshold limit script

Jump to solution

Gave up on VB, switched to Perl.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.