Change date field to empty, Bulk API | Community
Skip to main content
Steven_French
Level 1
October 5, 2018
Question

Change date field to empty, Bulk API

  • October 5, 2018
  • 2 replies
  • 5527 views

Hi there,

I'm currently using the Bulk Import API to upload a CSV of leads.

We have lead records with values in some custom date fields. However I cannot seem to set them to null using the bulk api.

My CSV could look like this:

id, customDateField
"1234", NULL

This:

id, customDateField
"1234", ""

Or even this:

id, customDateField
"1234", " "

And still the field refuses to change! What is the expected field value to set a date to null?!

Could someone please help.


Regards,Stevne

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

SanfordWhiteman
Level 10
October 5, 2018

NULL but not with that extra space.

Level 4
October 24, 2018

So, like this?

"1234",NULL

I'm having the same issue - thank you!

SanfordWhiteman
Level 10
October 25, 2018

Yes.

Gaoan_Guo
Level 2
July 24, 2019

you should use "null" as a string 

SanfordWhiteman
Level 10
July 24, 2019

NULL does not need to be quoted.

All fields in a CSV are text (it's a text format).

Double-quoted

  ...,"NULL",...‍‍

is no different from

  ...,NULL,....

in this context.

Quoting is used to allow fields to contain double quotes, line breaks, and/or commas, i.e. to avoid delimiter collision.

Question's already answered, anyway.

Gaoan_Guo
Level 2
July 25, 2019

I retried several cases in my local, the time I found NULL wasn't working is in early 2019, looks marketo has fixed this problem.

it's true we can use NULL to clear the field

Also using "null"(quote or unquote no difference) is still working and can set the value to blank,