Skip to main content
Question

Increase the length of a user defined field

  • February 22, 2021
  • 9 replies
  • 718 views

Forum|alt.badge.img+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

Forum|alt.badge.img+6
  • Hero (Partner)
  • 20 replies
  • February 22, 2021

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

 

 


Forum|alt.badge.img+6
  • Author
  • Do Gooder (Partner)
  • 19 replies
  • February 24, 2021

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


Forum|alt.badge.img+6
  • Hero (Partner)
  • 20 replies
  • February 24, 2021

Hi @tatRojalD ,

 

Please find the below discussion to create an extension table.

Thanks,

Hari


Forum|alt.badge.img+6
  • Author
  • Do Gooder (Partner)
  • 19 replies
  • February 25, 2021

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


Isuru Wijeratna
Superhero (Employee)
Forum|alt.badge.img+21
  • Superhero (Employee)
  • 241 replies
  • February 26, 2021

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


Forum|alt.badge.img+6
  • Author
  • Do Gooder (Partner)
  • 19 replies
  • February 26, 2021

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?


Isuru Wijeratna
Superhero (Employee)
Forum|alt.badge.img+21
  • Superhero (Employee)
  • 241 replies
  • February 26, 2021

@tatRojalD 

 

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

 

Thank You

Isuru


Forum|alt.badge.img+6
  • Author
  • Do Gooder (Partner)
  • 19 replies
  • February 26, 2021

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


Isuru Wijeratna
Superhero (Employee)
Forum|alt.badge.img+21
  • Superhero (Employee)
  • 241 replies
  • February 26, 2021

@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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings