Convert String field to Reference field of a Custom Table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @brogaming70,
Please refer to the links below:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0695947
https://www.servicenow.com/community/developer-forum/changing-the-type-of-field-from-string-to-refer...
If it is helpful, please mark it as helpful and accept the correct solution. By referring to this solution in the future, it will be helpful to them.
Thanks & Regards,
Abbas Shaik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
string contains text. how will you replace it with reference type as it requires a custom table
The error message clearly says you have data in that field for records and hence you can't convert
check this
Changing or converting field type 'string' to 'reference' on existing, custom field
Workaround
-> export that table data including that field
-> then delete the data from that field
-> then change the type
-> then create a custom table which holds that string values which you exported earlier
-> load data to your existing table for that field and update the field with that record sysId holding the string in custom table
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hope you are doing good.
Did my reply answer your question?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
