Changing the type of field from String to Reference throwing error.

Lovenit Singh1
Tera Contributor

I am changing the type of field for particular table. While changing the type of field from String to Reference is throwing an error. That is there exists records with data in that field.

How can we change the type without hampering the records or any alternative solution.

 

find_real_file.png

4 REPLIES 4

Sai Kumar B
Mega Sage
Mega Sage

@Lovenit Singh 

Yes, To modify the field type from String to Reference we have to clear out the values in existing records 

Do we have any other option?

1.) Export the data first

2.) Delete the reference field values

3.) Modify the field type

4.) Import the data again into that table 

Bert_c1
Kilo Patron

Reference fields contain the sys_id of the 'referenced' record in the 'referenced' table. And the platform will try to prevent data loss in field type changes.  See the error message in your screenshot, values present don't meet the content requirements of a sys_id. As the previous person posted, clear out the existing data, or create a new field for your use.