The Now Platform® Washington DC release is live. Watch now!

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Best practices for field Datatype change

G Balaji
Kilo Guru

Hi,

What is the best practices to be followed before changing the data type of a field?

We've custom table which has choice data type field A. Now, the requirement has changed as to let the user select multiple choices. I could implement this requirement using checkbox data type or list data type. 

What is the best practice that has to be following before data type is changed from choice to list?

Thanks.

1 ACCEPTED SOLUTION

Anurag Tripathi
Kilo Patron
Kilo Patron

Hi,

Best Practice for Data Type change = DONT.

If you do this you will loose all data in the column for all records and if the table is huge then it can have performance implications also.

What i can suggest you do is: create a new field with the new data type needed, copy all data form old field to new (using background script)and then delete the old column. If needed change the label of the new column now to be same as old one.

 

Please mark my answer correct/helpful if it helped you solve your issue.

-Anurag

-Anurag

View solution in original post

5 REPLIES 5

Anurag Tripathi
Kilo Patron
Kilo Patron

Hi,

Best Practice for Data Type change = DONT.

If you do this you will loose all data in the column for all records and if the table is huge then it can have performance implications also.

What i can suggest you do is: create a new field with the new data type needed, copy all data form old field to new (using background script)and then delete the old column. If needed change the label of the new column now to be same as old one.

 

Please mark my answer correct/helpful if it helped you solve your issue.

-Anurag

-Anurag

Hii

 

Are you looking for more info? if this is answered can you please close this thread by marking my answer correct?

 

Thanks,

Anurag

-Anurag

Are you looking for more info? if this is answered can you please close this thread by marking my answer correct?

-Anurag

Hi Anurag,

How would I achieve what you said but for 5 records only? For example, I have 50 records with fields that need a data type change. How can I copy data for these 5 records' current fields to new fields?