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.
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.
VB Script
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 |
Comments (Undergoing maintenance)





