How can I change a textarea to a text input?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2018 05:42 AM
I have a user created field on cmdb_ci_comm "IMEI Number" that has been around since before I joined this company. It is currently displaying as a textarea:
The business want this made smaller, as there is no need for it to be so large. Originally the maxlength was set to 4,096, so I hoped that by reducing the field length to 30 it would change, however it has not.
I cannot override the height with style rules since some users have the "Compact the user interface" and others do not, so no one size would work for everyone.
I also cannot delete this field and create a new field to replace it since it already has a lot of data in production.
I followed some suggestions (https://community.servicenow.com/community?id=community_question&sys_id=d2cefaa5db58dbc01dcaf3231f96...) to remove the field and refresh the cache, then replace it but that hasn't helped.
I can't find any other settings that would appear to be responsible for this behaviour, or that distinguish it from other String fields that are rendering as text type inputs.
Any help or information greatly appreciated.
Thanks,
Tom
- Labels:
-
Instance Configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2018 05:51 AM
Hi Tom,
Does that field currently contain data that has more than 30 characters?
Here are some notes from docs that you might find useful:
"Note: You can change between string-based data types as long as length changes do not cause any data loss from truncation. For example, you can change from a MEDIUM database type to a VARCHAR(100) database type if none of the existing data is greater than 100.
The system cancels any length change that results in data loss due to truncation."
Jenny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2018 07:33 AM
Hi Jenny,
Interesting. No, none of the records are over 30 characters, however it seems quite a few records contain linebreaks. Would that cause a similar issue? Although if it has cancelled the length change why does the dictionary entry now say 30? I would have assumed it would refuse the update and still show 4,096.
Thanks,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2018 04:50 AM
HI Tom,
I think you are right. Looks like the field size change went through. I tested reducing field length on my development instance, and height of the field was automatically reduced based on the field length.
Is there any field style defined for that field that's setting the height?
Thanks,
Jenny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2018 07:56 AM
Hi Jenny,
No, there are no styles defined for this field at all.
Thanks,
Tom