I'm using Quality Center 10, and have a question about retrieving data from a user field:
I have a Test User Field defined as TS_USER_15 as a "Customers" field from type "lookup List" which has several values. How can I read these list of values from a VB script running as a test? Thanks.
Found the answer by myself:
'Consider m_td_connection = TD_connection
Dim iGlobalListCounter, iListCounter, ValuesStr, ProductListName
ProductListName = "Status"
For iGlobalListCounter = 1 to m_td_connection.Customization.Lists.Count
If m_td_connection.Customization.Lists.ListByCount(iGlobalListCounter).RootNode.Name = ProductListName Then
ValuesStr = m_td_connection.Customization.Lists.ListByCount(iGlobalListCounter).RootNode.Children.Item(1).Name ‘starting ValuesArr with the first value
For iListCounter = 2 to m_td_connection.Customization.Lists.ListByCount(iGlobalListCounter).RootNode.ChildrenCount
ValuesStr = ValuesStr & "," & m_td_connection.Customization.Lists.ListByCount(iGlobalListCounter).RootNode.Children.Item(iListCounter).Name
Next
End If
Next
Msgbox ProductListName & " list values = " & vbCrlf & ValuesStr