Search:     Advanced search

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

Article ID: 450  |  Last updated: 23 Dec, 2014

If you use the 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: 23 Dec, 2014
SDK SOAP dropdown field field not set

Prev   Next
Understanding Notifications in TestTrack 7.6 and Earlier     Understanding TestTrack Electronic Signatures