Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

ClearQuest: Dependent Choice List doesn't refresh values when parent field value is changed

Hello,

I'm using CQ designer to create a new form. There’re 3 fields called Family, Product, Version Number in the interface below. The value of lower one field is dependent on value of upper one. For example, only when I set a value of Family, I can choose a product from the drop down list. If Family has no value, Product has no value. Similar to Version Number which is dependent on Product value.

The problem is that when I create a new record of this form, and set a Family value, and then go to “Product” drop down list, no options displayed. But if I click OK to save the record, and then re-open it, and select Product again, I can see the values. That means, in the first time in edit mode, "Product" field doesn't recalculate when "Family" is assigned a new value. But "Product" field is recalculated after saving and reopening the record.....

The same issue on Version_Number.

In "Value Changed" hook for Family field, I have a single line code to reset Product value when Family value is changed:

                SetFieldValue "Product", ""

Below is the source code for Choice_List of “Product” field.

  ---------------------------------------------------------------------------------------------------------------

Sub product_ChoiceList(fieldname, choices)

  ' fieldname As String

  ' choices As Object

  ' record type name is ValidationObjective

  ' field name is Product

 

'               Product name is dependent on Family value

                Dim sessionObj

                Dim filterObj

                Dim queryObj

                Dim resultSetObj

                Dim family

 

                Set sessionObj = GetSession()

                family = GetFieldValue("Family").GetValue()

                Set queryObj = sessionObj.BuildQuery("Family")

                Set filterObj = queryObj.BuildFilterOperator(AD_BOOL_OP_OR)

                filterObj.BuildFilter "Name", AD_COMP_OP_EQ, family

                queryObj.BuildField ("products")

                Set resultSetObj = sessionObj.BuildResultSet(queryObj)

               

                resultSetObj.Execute 

 

                Do While resultSetObj.MoveNext = AD_SUCCESS

                  choices.AddItem resultSetObj.GetColumnValue(1)

                Loop

 

End Sub

---------------------------------------------------------------------------------------------------------------


Can you advise me what to change? Thanks very much in advance.


Dependent lists

0 votes



One answer

Permanent link
 I figured this out by myself.....

In CQ designer, right click on the hook, and select "Recalculate Choice List" so that the list values can refresh when parent field value changes.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Aug 29 '14, 5:04 a.m.

Question was seen: 6,031 times

Last updated: Aug 29 '14, 7:38 a.m.

Confirmation Cancel Confirm