Quick search on list view of longer number giving "overflowed an int. column" type error

  • 13 March 2017
  • 1 reply
  • 4 views

Badge +8

Hi there.  Me again.

 

So, on a list view, I would like my folks to be able to search for a document control number which is, for example, 170699600192.

 

When they do, they get this error:

 

"The conversion of the nvarchar value '170699600192' overflowed an int. column. The conversion of the nvarchar value '170699600192' overflowed an int. column. The conversion of the nvarchar value '170699600192' overflowed an int. column. "

 

I found this article that addresses it:

 

http://community.k2.com/t5/tkb/articleprintpage/tkb-id/TKB_blackpearl/article-id/4551

 

 

Two problems, though:

 

#1 - This column won't always be just numbers (sometimes the DCN has a letter in it) thus the "Big Int" won't work.

 

#2 - It's already set up as being nvarchar(max) in the database and a text field in the smart object, so I'm not sure WHY it's converting it to an integar anyway.  Why would it not be treating the numbers as a text field? 

 

Anyway, as a work-around, I plan on just making it part of our instructions to only search for a document control number using like the last 6 digits (when you do that, it doesn't error) but any thoughts on a way to just have K2 treat this field as text and not convert it to an int. when it's doing this type of quick search?

 

Rob

 


1 reply

Badge +9

Your issue of Data Type is similar to this scenario.

 

SMARTOBJECT DATA TYPE CHANGE FROM TEXT TO MEMO

 

There was a requirement for asking me to change the data type of the existing SmartObject from type TEXT to type MEMO. So as in the normal case I did edit the SmartObject from the K2 designer and changed the property data type from existing TEXT to MEMO and deployed the SmartObject, now here is the tricky thing, if you try executing the CREATE SmartObject method with more than 100 characters input, it still throw you an error of string truncated.

 

And if you go back to designer and open the SmartObject and  take a look at the changed property, it appears as MEMO.  This was due to no update of the SQL table column from type text to MEMO(MAX).  Even changing the SQL table column directly from the SQL management studio and refreshing the service doesn’t help you in fixing this issue.

 

The only way of fixing this issues is, open the K2 Studio, browse to the SmartObject need to update the data type from the K2 Object browser, right click on it and select save to local, now SmartObject appears on the Solutions explorer, open it, go to the property and change the data type from TEXT to MEMO and then deploy it from K2.

Reply