How to get/know the "field names" in QC?
In QC users can see the Label of the fileds but I would like to know all the 'Field Names and Labels". Do we have any way to know the field names and labels with out go to customization and No database access.
I heard as this is possible through the scripting but not sure... Just I would like to know is it possible or not? If yes how and script guidence...
Dim gFieldTableNameDICT: Set gFieldTableNameDICT = CreateObject("Scripting.Dictionary")
gFieldTableNameDICT.CompareMode = vbTextCompare
gFieldTableNameDICT.Item("RQ") = "REQ"
gFieldTableNameDICT.Item("CY") = "CYCLE"
gFieldTableNameDICT.Item("TS") = "TEST"
gFieldTableNameDICT.Item("TC") = "TESTCYCL"
gFieldTableNameDICT.Item("BG") = "BUG"
gFieldTableNameDICT.Item("RN") = "RUN"
Dim gFieldToLabelDICT: Set gFieldToLabelDICT = CreateObject("Scripting.Dictionary")
gFieldToLabelDICT.CompareMode = vbTextCompare
' If it doesn't exist yet in fieldlabel dict -> add to dict
If Not gFieldToLabelDICT.Exists(strFieldName) Then
Dim custFields: Set custFields = TDConnection.Customization.Fields
Dim tableName: tableName = StrGetTableNameForField(strFieldName)
If custFields.FieldExists(tableName, strFieldName) Then
gFieldToLabelDICT.Item(strFieldName) = custFields.Field(tableName, strFieldName).UserLabel
StrGetFieldLabelForField = gFieldToLabelDICT.Item(strFieldName)
Dim code: code = Split(strFieldName, "_")(0)
Dim result: result = gFieldTableNameDICT.Item(code)
StrGetTableNameForField = result
Or you can use Excel Report with the folowing sql query:
SELECT SF_COLUMN_NAME, SF_USER_LABEL FROM SYSTEM_FIELD where SF_TABLE_NAME='BUG' order by SF_COLUMN_NAME
You can find the db structure in "HP Quality Center Database Reference" manual.
You can try this.Go to dashboard.create a new excel report --click on configure and click on query builder which will open a new editor and onto the right side you will see the tables and the field names for the particular project.Pick the option user and sql entities from entities view.Then based on the module you are looking you can expand the table and see the field names.
Hope this helps,
i din get that solution
i am adding a new test case through OTA in HPQC .
i need to assign values to the fields of test ie name,status,designer,exec date etc as entered by the user
the values for the properties of hpqc (like name,status,exec date etc) can be easily assigend
but in order to assign values to customised fileds .... i am unable to get the option test.FIELD in my code by which i can assign vales to customised properties like this
test.field["TS_USER01"]= "jack" ;
am working in C# .net
Once you have the list of all fields, you can look at the Properties for each Field item in the list. If you know the visible label for the field, then you can look at the UserLabel property to find the Field item from the list that matches. Once you've found the specific Field item from the list, then you can look at that item's Name property to get the name to use with the Test.Field () method.
The OTA API documentation has sample code for doing this.
(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)