- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2022 08:38 PM
Hello.
An error occurs when changing the maximum length of the table from 1000 to 160.
Is there a way to temporarily disable the check?
Which one should I deactivate?
UI action? business rules?
data policy?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2022 08:52 PM
Hi, I assume that the field size was increased, and records then populated to the higher limit and now you are rolling back to OOB size?
The system is preventing your change as data will be lost\truncated\corrupted and I think that the correct fix for this would be to review and resolve issues with your data exceeding the field length and then make the size change.
If you don't care about loosing data then you could just set the field content to '' where the string size exceeds 160 char or truncate to 160 char before you run your script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2022 08:52 PM
Hi, I assume that the field size was increased, and records then populated to the higher limit and now you are rolling back to OOB size?
The system is preventing your change as data will be lost\truncated\corrupted and I think that the correct fix for this would be to review and resolve issues with your data exceeding the field length and then make the size change.
If you don't care about loosing data then you could just set the field content to '' where the string size exceeds 160 char or truncate to 160 char before you run your script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2022 09:00 PM
Thank you.
After changing from 160 to 1000, it is no longer possible to return to 1000 to 160.
I'm not sure which record in the task table is the cause (1272 digits), so I want to temporarily uncheck it.
Since it's a test instance, it doesn't matter if the data is lost.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2022 09:07 PM
HI
@Yuki21
Run this script in the "scripts - background" to find out the record.
Don't forget to change the table and field's name to the target one .
var gr = new GlideRecord("incident")
gr.query()
while(gr.next()){
if(gr.getValue("description") && gr.getValue("description").length > 160 ){
gs.info(gr.getValue("number"))
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2022 09:33 PM
Thank you.
After checking the applicable fields, there were no more than 160 records.
Is there an error in the maximum value check in such a case?