Expand my Community achievements bar.

To Store The Value as String

Avatar

Level 1
Level 1

Hi Team,

 

There is a requirement to store the value as a string and There is a column called year of travel, and this column has an integer data type. 

in the data loading file, the data looks like 2,008, 2,009, 2,007, 1,998, ... Like that
When I'm trying to update the data, it's displaying the value as 2,006.
How can I remove the comma and store it as a year, such as 2007?

I have used the Tostring expression in the enrichment activity. It's actually removing the ", " but getting an error in the update data activity (as the first-year travel attribute is long/int, unable to parse the string value)

Can anyone Help

 

1 Reply

Avatar

Community Advisor

Hi @VV7 ,

As you have 'Year' field data type as integer, the value will be displayed with comma separator for thousands in UI. (Example, 1,000,000 for 1Million). So as your value is 2006, it display as 2,006. 

Instead you can store the year field as string in schema. So that you can view the value as 2006.

Later in any of your campaign if you want to query 'Year' greater than or less than , you can use ToInteger(@year) greater than or less than operator.