How to migrate custom field property which is Text Field to Number Field without loosing data

SOLVE
Highlighted
New Contributor

we are storing currently number data in a single line text. I would like to migrate it to a Number field without losing any data. What is the best way to do this?

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Highlighted
Esteemed Contributor

Hi @cb-madhukiran1,

 

I'm sure there's a funky way of dealing with this if you're on e.g. Pro or Enterprise subscriptions... probably using Workflows (how I wish I had workflows!!!).

 

Anyway, assuming you're on a basic/starter subscription, you should be able to achieve this using export and import.  

 

  1. Export your contacts/companies from Lists.
  2. You'll see an option to add columns to the exported file.  You can include your custom Single Line Text field in this.  Let's call it "NumberAsText".
  3. Your exported .csv file now contains your NumberAsText field...
  4. Set up the new Custom Property   Let's call it NumberAsNumber.
  5. Prepare the same .csv file for importing back into HubSpot. 
  6. During import, map your "NumberAsText" field in the .csv file to your new "NumberAsNumber" custom property.  

Hey presto - your new custom property should be populated with the old text data, but in a number field!

 

Hope this helps.


Did my post help answer your query? Help the Community by marking it as a solution
"The rest of my advice my advice has no basis more reliable than my own meandering experience. I will dispense this experience... now!"
Reply
0 Upvotes
3 Replies 3
Highlighted
Esteemed Contributor

Hi @cb-madhukiran1,

 

I'm sure there's a funky way of dealing with this if you're on e.g. Pro or Enterprise subscriptions... probably using Workflows (how I wish I had workflows!!!).

 

Anyway, assuming you're on a basic/starter subscription, you should be able to achieve this using export and import.  

 

  1. Export your contacts/companies from Lists.
  2. You'll see an option to add columns to the exported file.  You can include your custom Single Line Text field in this.  Let's call it "NumberAsText".
  3. Your exported .csv file now contains your NumberAsText field...
  4. Set up the new Custom Property   Let's call it NumberAsNumber.
  5. Prepare the same .csv file for importing back into HubSpot. 
  6. During import, map your "NumberAsText" field in the .csv file to your new "NumberAsNumber" custom property.  

Hey presto - your new custom property should be populated with the old text data, but in a number field!

 

Hope this helps.


Did my post help answer your query? Help the Community by marking it as a solution
"The rest of my advice my advice has no basis more reliable than my own meandering experience. I will dispense this experience... now!"
Reply
0 Upvotes
Highlighted
New Contributor

Can we do this via the "update property" API? Will it cause any adverse effects if I try to update the fieldType to number directly? Or should I be creating a new field copy the data to the new field, delete the old field, and create the new field as number

Reply
0 Upvotes
Highlighted
Esteemed Contributor

Hi @cb-madhukiran1,

 

Using the API in that way is beyond the realms of my expertise.  Sounds like something that should be possible, but I couldn't advise with any certainty. 

 

Using my method you would be creating a new field, deleting the old field.  It takes just a few minutes, there's no tinkering with the API, no potential adverse effects, and I can guarantee it works!

 

Good luck


Did my post help answer your query? Help the Community by marking it as a solution
"The rest of my advice my advice has no basis more reliable than my own meandering experience. I will dispense this experience... now!"
Reply
0 Upvotes