How to get the Full Name in drop-down fields in ClearQuest using perl hook

Technote (FAQ)


How do you write Perl code in IBM Rational ClearQuest to get the Full Name to appear in the drop-down fields such as "Owner" or "Assignee"?


You would like to identify a user with the full name rather than the loginID for a good readability factor and easier access.



  1. Login to IBM Rational ClearQuest Designer

  2. Check out the Schema

  3. Click Record Types > Record > Fields

  4. Create a new field Assignee or Owner of a "Short_String" type

    Note: Corresponding field on the form should be a drop-down field.

  5. Click Choice List > Scripts > Perl

  6. Add the following hook code

    Note: In this example, field is Assignee


    All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

    sub assignee_ChoiceList {
       my($fieldname) = @_;
       my @choices;
     $CQSession = $entity->GetSession();
    $queryDefObj = $CQSession->BuildQuery("users");

    $operator = $queryDefObj->BuildFilterOperator($CQPerlExt::CQ_COMP_OP_EQ);
    $operator->BuildFilter("is_active",$CQPerlExt::CQ_COMP_OP_EQ,[ "1" ]);

    $resultSetObj = $CQSession->BuildResultSet($queryDefObj);

    while ($resultSetObj->MoveNext() == $CQPerlExt::CQ_SUCCESS) {
       return @choices;


    Note: This code will place Full Name of the ClearQuest Active users in the choice list of the field.

  7. Save

  8. Perform Validation and check if you see any errors.
    If no errors, perform a Test Work

  9. Verify in the Test Database

  10. Check in the Schema

  11. Upgrade the Database

Rate this page:

(0 users)Average rating

Add comments

Document information

More support for:

Rational ClearQuest
Designer - Hooks

Software version:


Operating system(s):


Reference #:


Modified date:


Translate my page

Machine Translation

Content navigation