|  | Level: Introductory Rational staff, Staff, IBM
21 Apr 2004 This is an example of a user full name choicelist hook for customizing IBM Rational ClearQuest.
This item was originally published in May, 2002.
NOTE: This hook is presented only as an example of how to customize your use of IBM® Rational® ClearQuest®. It has not been formally tested, and is not supported by IBM.
Description
This hook shows how to populate a pick list with a list of active users' full names by creating a query to gather this information. Please do not use Admin session to gather this information.
Script Language
VB Script
Code
DIM RegularSession
DIM queryDef
DIM ResultSet
DIM Is_Active_Value
DIM colValue
set RegularSession = GetSession
set queryDef = RegularSession.BuildQuery("users")
Is_Active_Value = 1
queryDef.BuildField("fullname")
set queryFilterNode = queryDef.BuildFilterOperator(AD_BOOL_OP_AND)
queryFilterNode.BuildFilter "is_active", AD_COMP_OP_EQ, Is_Active_Value
set ResultSet = RegularSession.BuildResultSet(queryDef)
ResultSet.Execute
status = ResultSet.MoveNext
while status = AD_SUCCESS
RegularSession.OutputDebugString ResultSet.GetNumberofColumns & vbCrLf
For n = 1 to ResultSet.GetNumberofColumns
colValue = ResultSet.GetColumnValue (n)
choices.AddItem(colValue)
RegularSession.OutputDebugString colValue & vbCrLf
Next
status = ResultSet.MoveNext
wend |
About the author  | |  | This article is brought to you by the Rational staff at developerWorks. |
Rate this page
|  |
|