Changing the type of field from String to Reference throwing error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2022 09:02 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2022 09:13 AM
Yes, To modify the field type from String to Reference we have to clear out the values in existing records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2022 09:14 AM
Do we have any other option?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2022 11:22 PM
1.) Export the data first
2.) Delete the reference field values
3.) Modify the field type
4.) Import the data again into that table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2022 09:44 AM
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.