How to change the Reference type filed to list type ?

Community Alums
Not applicable

Hi All,

As per my requirement I am trying to change the type of a OOB field from "Reference to List". It throws an error as shown in the below screen shot. is it possible ? can anyone tell me why it is throwing an error..?

Syntax Error or Access Rule Violation detected by database (BLOB/TEXT column 'group_resource' used in key specification without a key length)

FAILED TRYING TO EXECUTE ON CONNECTION 31: /* dev22218001, gs:3C4710B1DBEDF20034C35421CF9619F0, tx:19491035dbedf20034c35421cf9619c1 */ ALTER TABLE resource_plan MODIFY `group_resource` MEDIUMTEXT Syntax Error or Access Rule Violation detected by database (BLOB/TEXT column 'group_resource' used in key specification without a key length)

Invalid update

find_real_file.png

1 ACCEPTED SOLUTION

Hi,



I can see that your field "group_resource" contains data due to which you are not able to change the field type. You need to make this field data as empty first before changing the type. Once you have cleared this field value for all the records then only you would be able to change the Type.



find_real_file.png



Hope this helps.Mark the answer as correct/helpful based on impact.




Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

12 REPLIES 12

pbo
Mega Expert

Hi,



I believe that you are not allowed to change field type when table already contains data.


In this case you need to empty the table or create a new field



Patrick


kalyan778
Mega Guru

Hi Ayyappaswamy,



yes,we can change the data type,but first you need to clear the data in the table on the Particular field.


Lets say if X is the field you have 10 records in the table first you need to clear the values of the X field in the 10 records then try to change the data type.




Thanks


shloke04
Kilo Patron

Hi,



As mentioned above in the thread,you need to clear the values of the field for which you wan to change the Field Type. But an important point to note is make sure you take a backup of the data for that field for which you are changing the field Type, so that once the type has been changed you can map your data as required for the existing records else it will show as empty only.



Yo can map your data again to the existing records either by using a Transform map or even by using background scripts.



Once the data has been cleared you would be able to change the field type.



Hope this helps.Mark the answer as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Community Alums
Not applicable

Hi All,



Thanks for your response,



In my developer instance I have 900 records for Resource plan table, So instead to deleting that data, I have tested in another table "testing table". Location field in that table has no data, though when I am changing the type of the field from Reference to List, That is towing same king of error. Please check the below screen shot.



find_real_file.png



find_real_file.png