2

I defined a data extension which includes a decimal attribute whose Nullable field is set to Yes. While newly created records in this data extension have null values for this attribute it does not appear to be possible to set those decimal attribute back to null. The Contact Builder seems to discard such edits. API calls based on http://code.exacttarget.com/apis-sdks/soap-api/updating-a-data-extension-object-with-a-null-field-value.html which set other attributes to null successfully return an error:

    <UpdateResponse xmlns=\"http://exacttarget.com/wsdl/partnerAPI\">
            <Results xsi:type=\"DataExtensionUpdateResult\">
                    <StatusCode>Error</StatusCode>
                    <StatusMessage>Errors Occurred</StatusMessage>
                    <OrdinalID>0</OrdinalID>
                    <ErrorCode>2</ErrorCode>
                    <Object xsi:type=\"DataExtensionObject\">
                            <PartnerKey xsi:nil=\"true\" />
                            <ObjectID xsi:nil=\"true\" />
                            <CustomerKey>example</CustomerKey>
                            <Properties>
                                    <Property xsi:type=\"NullAPIProperty\">
                                            <Name>decimal_attr</Name>
                                    </Property>
                            </Properties>
                    </Object>
                    <ErrorMessage/>
                    <ValueErrors>
                            <ValueError>
                                    <Name>decimal_attr</Name>
                                    <ErrorCode>70007</ErrorCode>
                                    <ErrorMessage>The value for column [decimal_attr] is not a valid decimal. Parse error InvalidDecimal]</ErrorMessage>
                            </ValueError>
                    </ValueErrors>
            </Results>
            <RequestID>e27dac53-5941-4801-8be8-c2d30cec863a</RequestID>
            <OverallStatus>Error</OverallStatus>
    </UpdateResponse>

Is there something I am missing? Is there any way to set a decimal attribute to null?

1

If that SOAP packet from the link you posted does not work, then you're going to have to do a work around. Create a query activity that sets the field of interest back to NULL. Then, use an API call to start it. Not optimal, but it will do what you need it to do.

2
  • Thanks, that's better than nothing but I'd hate to have to give up atomic updates of these rows and split them across two API calls. – Jonah Dec 17 '14 at 23:39
  • I have often recommended you "invent" a new NULL value (never used elsewhere), like 1234567.89 and make that the default value on the column. Instead of setting a value to NULL you use that value, and modify your code accordingly. – Timothy Dec 18 '14 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.