0

i have a 700 items that already exist using number column data type, and I want to change column data type from Number to Text without loosing data. i already just change it into number in column list settings, but it turn my current data no exact same as before they have like this format 1.22346e+006. i'm using sharepoint 2013

can you help me with that?

thanks

2
  • Was this a text column before changing to number (when having this value - 1.22346e+006)? Commented Feb 10, 2023 at 12:33
  • no its reverse, it was number column and after i change it to be single line of text, the value changes like that Commented Feb 10, 2023 at 13:21

1 Answer 1

0

Changing column date type is not good idea in general. Sometimes you will be lucky and everything goes fine, but sometimes it can end up badly. I do not know reason why do you want to change column date type, but I can offer few options with their pros and cons:

1. Use calculated column

Create new calculated column. In this column use formula which allows you better control of the conversion process. Like TEXT function. On the New or Edit form you will have number column, but in the view you can have number column, text column or both.
Pros:

  • Items will remain intact (so Modified date or Modified by remains intact)
  • Quick and relative easy

Cons:

  • You will have two columns.
  • Calculated column you cannot edit directly, only source number column can be edited

2. Manual copy data

Create new text column. Export list to Excel, in Excel copy number column data to text column data. Edit data if needed. In SharePoint list edit in Grid view. Manually copy data from Excel to list. You can adjust batch length by edit view (default is I think 30 items). Exit grid view. Delete number column. Be aware that there is no turning back after you will delete number column!
Pros:

  • You can check/edit data in the process
  • You will end up with only one column

Cons:

  • New version of item will be created (Modified date or Modified by will change)
  • Can be time consuming (but still acceptable for 700 items)

3. Use Workflow/Power Automate Flow/PowerShell script

Create new text column. Create script or Workflow which copy data from one to another. Delete number column. Be aware that there is no turning back after you will delete number column!
Pros:

  • Useful for many items, which is impossible to convert by previous option
  • Convert data using different conditions (eg. if value is below zero do something, if is above zero do something else)

Cons:

  • New version of item will be created (Modified date or Modified by will change)
  • You have to have knowledge how to create and test workflow or script
  • Creating workflow or script is complicated and can be very time consuming

And it is possible to combine 1. with 2. or 3. by creating calculated column and copy values from it to text column.

Do not forget mark this as answer if it helps you.

2
  • Hi Thank you so much for your help i tried your options 1 in my case and its work ! Commented Feb 13, 2023 at 11:41
  • Option 1 works but PowerShell is you best friend for the cleanest solution
    – Jaitsujin
    Commented Feb 27, 2023 at 1:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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