So we have a large number of text fields that we want to convert to number fields without losing data. We have a script to write to convert the text to numbers, so for example it was

  • Monthly
  • Weekly
  • Yearly

so we converted Monthly to 12, weekly to 52 and yearly to 1, so far so good.

But when we take that and convert the field to a number field it just whips out the data

is there anyway way to make sure it saves the data when you convert the fieldtype?

  • I assume 'whips out' means 'wipes out' ? – cropredy Oct 24 '14 at 16:57

It whips out the data because even though you are "converting" your values to "numbers", they are still stored as a text datatype in that text type field. When you convert the field over, it will have an incompatible data type inside of it and will clear it out.

I don't really know the details of the scenario, but i would just export that field out with the record ID, change the field type, and then reinsert those values in as Numbers.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.