Question

Increase the length of a user defined field

  • 22 February 2021
  • 9 replies
  • 584 views

Userlevel 2
Badge +6

Customer wants to store a detail in a field which is 800/1000 character, I have change the data type to Long string as well as also changed the column datatype to VARCHAR(MAX). Still its showing the DB column supports upto 256 characters.’Value for column is too large.Maximum characters allowed is 256”


This topic has been closed for comments

9 replies

Userlevel 2
Badge +6

Hi @tatRojalD ,

 

You can’t able to change the datatype and Max chars of the FSM Metadata table fields, You can create an extension table and link it with your base FSM Metadata table to achieve your functionality.

 

Thanks,

Hari

 

 

Userlevel 2
Badge +6

Thank you.Please let me know how to create extension table.

Userlevel 2
Badge +6

Hi @tatRojalD ,

 

Please find the below discussion to create an extension table.

Thanks,

Hari

Userlevel 2
Badge +6

Thank you so much Hari. Could you please tell me why I am receiving error ’ row(****.****(***,**)) was changed after it was selected. Reselect and try again’ . when I am trying to save the page

Userlevel 6
Badge +21

HI @tatRojalD ,

 

The action you took to change the column Type to Longstring is correct then the table will create as below

IF OBJECT_ID('testtbl', 'U') IS NOT NULL 
    DROP TABLE testtbl
    CREATE TABLE testtbl( 
    col1 NVARCHAR(MAX) , 
    )
GO

 

But according to you need around 1000 chars, you can select column type as string and max chars as 1000. this is what I recommend you to use because allowing large and use limited is not a good approach.

 

if you need to change these in the FSM table, yes you can override it by using custom metadata. the table name, policy names, table namespaces should be equal to what in FSM metadata, and column name should equal to the column you need to override. then you have to drop the RnD table and create new one.

 

if you use the custom table, this is pretty easy work. just drop and create a table using the changed schema.

 

Thank You

Isuru Wijeratna

Userlevel 2
Badge +6

Hi Isuru,

You mean to say there is no need for creating extension table? I need to drop the existing quote table and create again? But how to get the old data if I delete the existing table? RND table as in custom metadata?

Userlevel 6
Badge +21

@tatRojalD 

 

If you have old data,  no need to drop and create. you can use alter table script.

 

Thank You

Isuru

Userlevel 2
Badge +6

Yes Isuru,

 

I have altered the table. And also changed the user_def23 to string with max Char(1000).

ALTER TABLE QUOTE 
    ALTER column user_def23 NVARCHAR(MAX);

 

Still the server data in the UI designer shows the max length as 256

Userlevel 6
Badge +21

@tatRojalD 

 

But you can edit it in UI designer

 

 

According to you have alter the table and metadata, this should allow. 

 

my custom metadata

Thank You

Isuru