Developer forum

Forum » Integration » Integration activity - converting text to double

Integration activity - converting text to double

Davy Capiau
Reply

Hi,

Issue: how to convert text to double in an integration activity

DW10 - XML provider > DW provider

----

In my source XML I have values like this: 

      <column columnName="MultipleQty"><![CDATA[12.00]]></column>

I want to map them to a value in the EcomProducts table where the data type is 'Double'.

When I run the activity it is ignored. So I should convert it with some code. I tried several scripts like this one:

@Code(Convert.ToDouble({0}))

Unfortunately it doesn't work. Anyone an idea? I want to avoid pre-processing the whole file with xsl.

 

 

 


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Davy,
have you tried to change the Xml source provider option "Source decimal separator - dot/comma/auto" and also select the appropriate Number format culture in the column mapping for the MultipleQty column?
BR, Dmitrij

 
Davy Capiau
Reply

Hi Dmitrij,

 

- Separator is on auto

- Number format culture: it's a list of all the countries. I don't understand how to interpret this. Going from a point seperated text field to a double that accepts regular point seperated fields?

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Davy,
The format culture is used in the calling of the .NET methods for the destination column type conversion
Can you try to set it to "English (United States)" format?

BR, Dmitrij

Votes for this answer: 1

 

You must be logged in to post in the forum