How to migrate custom field property which is Text Field to Number Field without loosing data
SOLVE
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?
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.
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".
Your exported .csv file now contains your NumberAsText field...
Set up the new Custom Property Let's call it NumberAsNumber.
Prepare the same .csv file for importing back into HubSpot.
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 has no basis more reliable than my own meandering experience. I will dispense this experience... now!"
Oct 16, 202412:56 AM - edited Oct 16, 202412:57 AM
Contributor
How to migrate custom field property which is Text Field to Number Field without loosing data
SOLVE
We've got Pro and unfortunatly still cant do it through a workflow as the copy field feature wont copy from a single line text field to a numerical field, which is unfortunate. Additionally we cant change the single line text field as it's used on an Facebook lead form and editing it is outside of our control.
Options for us will be export and import back in to the numerical field OR change our existing numerical field to a single line text field (new property) for now and future use and then exporting and importing to the new field.
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.
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".
Your exported .csv file now contains your NumberAsText field...
Set up the new Custom Property Let's call it NumberAsNumber.
Prepare the same .csv file for importing back into HubSpot.
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 has no basis more reliable than my own meandering experience. I will dispense this experience... now!"
How to migrate custom field property which is Text Field to Number Field without loosing data
SOLVE
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
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 has no basis more reliable than my own meandering experience. I will dispense this experience... now!"