Developer forum

Forum » CMS - Standard features » Can not import empty values into Integer and decimal number fields

Can not import empty values into Integer and decimal number fields

Hans Ravnsfjall
Hans Ravnsfjall
Reply

I am trying to make an import to populate Items, but I can not import empty columns into type Integer or Decimal number

 

I would expect the import to autmatically take care of this. Is it a bug, or am I making a mistake?


Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Hi Hans,

We try to avoid conversion an other manipulation of data when importing. However, you can provide null values instead.

If you are using the xml provider as source then you can mark columns with the isNull attribute, like in this example:

<?xml version="1.0" encoding="utf-8"?>
<tables>
  <table tableName="MyItem">   
    <item table="MyItem">
      <column columnName="Id"><![CDATA[1]]></column>
      <column columnName="Number" isNull="true" />
    </item>
  </table>
</tables>

I hope this helps.

Best regards,
Morten

 

You must be logged in to post in the forum