To Store The Value as String | Community
Skip to main content
Level 2
December 2, 2024
Solved

To Store The Value as String

  • December 2, 2024
  • 1 reply
  • 492 views

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

 

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

Hi @vanivi1 ,

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.

1 reply

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
December 3, 2024

Hi @vanivi1 ,

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.

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups