Skip to main content

Populate a choicelist with full names of active users

Rational staff, Staff, IBM
This article is brought to you by the Rational staff at developerWorks.

Summary:  This is an example of a user full name choicelist hook for customizing IBM Rational ClearQuest.

Date:  21 Apr 2004
Level:  Introductory
Activity:  350 views

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.

Comments (Undergoing maintenance)



Trademarks  |  My developerWorks terms and conditions

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=3890
ArticleTitle=Populate a choicelist with full names of active users
publish-date=04212004
author1-email=
author1-email-cc=

My developerWorks community

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Rate a product. Write a review.

Special offers