Community
Command Central
MVP Program
Monthly Mission
Blogs
Groups
Events
Media Vault
Products
Observability
Network Management
Application Management
IT Security
IT Service Management
System Management
Database Management
Content Exchange
SolarWinds Platform
Server & Application Monitor
Database Performance Analyzer
Server Configuration Monitor
Network Performance Monitor
Network Configuration Manager
SQL Sentry
Web Help Desk
Free Tools & Trials
Store
Home
Products
Network Performance Monitor (NPM)
Any ASP coders?
iunderwo
Guys,
I'm working on resource 91-NodePropertyList.Resource, and I'm trying to code something to convert the name of the custom property as SW sees it into something a little more intelligible. However, only the first custom property seems to be making the cut, all the rest don't match for some reason.
Here is the code:
<% C = False %>
<% Select Case List(I) %>
<% Case "Tier_1" %> <% response.write("Tier 1 Support Org.") %> <% C = True %>
<% Case "Cust_Name" %> <% response.write("<br>Customer Name") %> <% C = True %>
<% Case "Site_Abbr" %> <% response.write("Site Abbreviation") %> <% C = True %>
<% Case "FS_Plan" %> <% response.write("Field Service Plan") %> <% C = True %>
<% End Select %>
<% If C = False then %> <%=List(I) %> <% End If %>
Any idea what I'm missing or doing wrong?
// Ian Underwood - Service Management
// Level 3 Communications
Find more posts tagged with
Accepted answers
All comments
DonYonce
Ian,
You will need to change your "Select Case List(I)" to "Select Case Trim(List(I))". The "List = Split(Resource.GetProperty("PropertyList"),",")" command at the top of the resource leaves a space at the beginning of each property name (except the first one).
Also, here's a new resource with an example of changing the property name to an English name.... Simply save it as "91-CustomPropertyList.Resource" in the 2-1-NodeDetails directory.
<!-- Title=Selected Node Properties (customized)-->
<!-- Advanced=FALSE -->
<!--#include Virtual=/NetPerfMon/scripts/Resource.asp -->
<%
Dim Field
Dim I
Dim List
if len(Resource.Title) = 0 then
Resource.Title = "Selected Node Properties"
Resource.Sync
end if
Title=Resource.Title
SubTitle=Resource.SubTitle
EditButton="/NetPerfMon/Resources/2-1-NodeDetails/NodePropertyList.Edit.asp?ResourceID=" & Resource.ResourceID & "&ViewID=" & ViewID & "&NetObject=" & NetObject
HelpPage="Node-UserFields"
DoResourceHeader
List = Split(Resource.GetProperty("PropertyList"),",")
%>
<table width = "100%">
<tr>
<td colspan="4">
<%
If Not Node Is Nothing Then
%>
<table border="0" cellPadding="2" cellSpacing="0" width="100%">
<% For I=0 To Ubound(List)
if Not len(Node.GetProperty(List(I))) = 0 then %>
<tr>
<td class="Property" width="10"> </td>
<td class="PropertyHeader" vAlign="center"><%=EnglishPropertyName(List(I))%></td>
<td class="Property"><%=Node.GetProperty(List(I))%></td>
</tr>
<% End If
Next %>
</table>
<% Else %>
<tr>
<td class="Property" width="10"> </td>
<td colspan="4" class="PropertyHeader"><font color="Red">A Network Node was not selected</font></td>
</tr>
<% End If %>
</td>
</tr>
</table>
<br>
<%
Function EnglishPropertyName(Property)
Select Case Trim(Property)
Case "Tier_1"
EnglishPropertyName="Tier 1 Support Org"
Case "Cust_Name"
EnglishPropertyName="Customer Name"
Case "Site_Abbr"
EnglishPropertyName="Site Abbreviation"
Case "FS_Plan"
EnglishPropertyName="Field Service Plan"
Case Else
EnglishPropertyName=Property
End Select
End Function
%>
iunderwo
That's excellent! I didn't think of using a function (not a coder by trade).
Works like a charm!
// Ian Underwood - Service Management
// Level 3 Communications
loftenter
I'm looking for someone in the Southern California area that has experience with Orion and can code ASP and SQL. Let me know if any one is interested.
Thanks!
Justin
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Help
Best Of