I'm trying out the new WSProxy API for server-side javascript. I haven't been able to update a Data Extension field to NULL when it already contains a value.
Let's say "Student" is a nullable field. Putting this into the Properties
array passed to the updateItem
method doesn't clear out a value already stored in the Data Extension:
{
Name: 'Student',
Value: null
}
Neither does leaving the Value
property out entirely:
{
Name: 'Student'
}
The SOAP API documentation makes reference to a NullAPIProperty
object to use in this circumstance, but I can't figure out how to pass that kind of object to WSProxy or get that API to create it. (Creating an object using Platform.Function.CreateObject()
throws an error; that's a different API).
Value: ''
?''
as a Value works for boolean fields! Text fields are set to a zero-length string, which is not the same as NULL. This is important when using theIS NULL
operator and similar functions in SQL.{ Name: 'Student', Value: }
- but I expect you will likely get a syntax error. I think the empty string may be the best you can do. Perhaps try putting in a support ticket to SFMC. I will explore on my side as well and post if I find an answervar iAmNull
orvar iAmNull = null
then{ Value: iAmNull }
I get the feeling this may not work either, but worth exploring.