Maximum UD column length

I would like to create a new UD field with data type varchar(max). (Yes it does have to be more than 8,000 characters). i see on the UD Column Maintenance form for Data Type it has x(8). Can I put x(max)?

I don’t think that limits the actual data stored in the DB. Rather it is used as the default format for things like UI fields, BAQ columns, and on reports.

Will there need to be a UI element to edit or display it? Or is it for something like CNC code that just needs to reside in the Db, and will be uploaded by some other none UI means?

I was planning on replacing the current Purchase Order Memo field.

I don’t think you have to.

I pasted text of varying length (5,000, 8,500, and 32,000 bytes) into thre separate memo entries, and the entire text was accepted.

image

And to double check that it was all accessible in the UI, I closed the PO form, and reopened it and then went to the Memo screen. I selected the memo with 32,000 bytes, did a CTRL+A (for Select All). Then pasted it into a text editor. The text editor shows a character count of 31.4 KB (pretty close to 32,000 when you multiply 31.4 x 1,204). and the last line of the copied text matches my source text

image

image

You are correct! I had looked at the Field Help and it showed x(1000). Looking in the actual database, it is actually varchar(max). Thank you for helping me figure this out!

1 Like

The X(1000) reference for Max Length is Epicor shorthand and goes back to the days when Max Length varied by DB and Platform and the number specified was actually a suggested “Output” Length. In the days past, the actual Max Length varied from Progress DB to SQL DB, by DB Version, by 32 / 64 bit, and by language selected - Single-Byte, Double-Byte, or Unicode.

ERP 10 is Unicode - varchar(max) - so ~ 1 billion characters.

2 Likes

I added a UD field using the x(1000) for infinite (apparently 1 billion) characters. However, I am finding that when I copy and paste text into my added comment field it does not let me edit that text. Has anyone else ran into this or know how to fix it?