How to empty a date field with bulkUpdateCreate api

Posted by wweultjes on 26-Jan-2015 07:40

Hello,

We are using the bulkUpdateCreate api for synchronizing data between our ERP and Rolllbase. When a date in our ERP is set to unknown this change isn't synchronized with Rollbase. Rollbase still shows the old value. What value do i put into the csv string to set the rollbase date to unknown?

Regards,

Wilco Weultjes.

All Replies

Posted by Orchid Corpin on 26-Jan-2015 09:09

Hi,

Just want to confirm first if you are using bulkUpdateCreate instead of bulkCreateUpdate?

Regards,

Orchid

Posted by Orchid Corpin on 26-Jan-2015 10:52

In your csv make the value of date fields empty and try checking the "Treat empty spreadsheet cells as NULL values for updated records" checkbox when creating the import map. See image below

Hope this may help.

Regards,
Orchid

Posted by wweultjes on 27-Jan-2015 02:48

Yeah your right it is bulkCreateUpdate, my mistake.

Posted by wweultjes on 27-Jan-2015 03:05

Hello Orchid,

Looks like that option is only working for the import and that the option is not an attribute of the importmap. When i import the csv this option it works fine when i use the same import map for bulkCreateUpdate it doesn't work.

Regards,

Wilco.

Posted by Orchid Corpin on 27-Jan-2015 08:35

I see, I didn't notice it because I created the import located in the UI, not in the object definition.

I will confirm first if this is really an expected behavior.

Regards,

Orchid

Posted by Orchid Corpin on 05-Feb-2015 14:43

Hi Wilco,

I just confirmed that the functionality "Treat empty spreadsheet cells as NULL values for updated records" isn't available when you create data map from object definition, this is only available when doing import from UI.

I find this as a good enhancement to Rollbase so that when we use the data MAP with REST or SOAP we can utilize this functionality. You can file it in our ideas page Ideas Page.

I am thinking if you can create an Update Field trigger to clear the date field, something like the code below:

var dateBefore  = "{!Date_Issued#before}";
var dateNew		= "{!Date_Issued}";
if( rbv_api.isImport() && (dateBefore == dateNew) ) {
  return "";	//clear date field
}


Hope this may help.

Regards,
Orchid

Posted by Orchid Corpin on 11-Feb-2015 11:54
Hi Wilco,

Can you confirm if the workaround works for you?

Regards,
Orchid
This thread is closed