Search:     Advanced search

Setting Drop-Down Field Values to Not Set in the Helix ALM SDK

Article ID: 450  |  Last updated: 02 Jun, 2017

If you use the Helix ALM SOAP SDK and try to change a drop-down field value to <not>, the behavior may not work as expected. For example, the following code was used in a C# application: 

value = null;

The developer wanted to change the field value to null (<not>). However, the defect did not change.

After some troubleshooting, the developer used the following code:

((CDropdownField)defect.customFieldList[0]).value = “”;

The difference? C# optimized this code and removed the null field from the response. The application then interpreted this to mean <not>.

Keep the following in mind:

  • You cannot set a drop-down field value to <not> using the SOAP SDK because you can technically have a field value named <not> and it would be ambiguous.
  • You cannot set the value to null. Languages, such as C#, read null as the absence of a value and exclude the value from the request. When SOAP gets the request, it sees that a value does not exist, assumes no changes were made, and continues processing.
  • You can use an empty string. Languages, such as C#, interpret this to mean there is a value but it is empty. When SOAP gets the request, it sees that an empty value exists, and interprets this to mean <not> <not>.
Article ID: 450  |   Last updated: 02 Jun, 2017
SDK SOAP dropdown field field not set

Prev   Next
Helix ALM Before Save Triggers Do Not Run     Upgrading Workflow Event Dates to TestTrack 2008 and Later