Skip to main content
Nintex Community Menu Bar

SmartObject Authoring - Changing Text field length

  • August 13, 2009
  • 2 replies
  • 8 views

Forum|alt.badge.img+1

Hi,


I am creating SmartObjects programmatically. 


When I create an 'ExtendObjectProperty' with Type = PropertyDefinitionType.Text, by default Text is stored as varchar(100) in the SmartBox . Is there any way to change the length programmatically before calling the Create method? Or any other way?


Thanks

2 replies

Forum|alt.badge.img+10
  • Nintex Partner
  • August 21, 2009

Hi,


Add the following to your ExtendedObjectProperty:


property.Metadata.AddServiceElement("maxsize", "200");


Smartbox SmartObjects have several service elements which are implemented in exactly the same way:



  • decimalplaces
  • encrypted
  • constantsize
  • sortby
  • unique
  • maxsize

Credit to Jannes for providing these elements and how to implement them.


Regards,


 


Forum|alt.badge.img+1

Hi Johan,


Excellent! Thanks a lot for the reply, I was starting to think about updating the SmartBox DB but felt it would really be a "kludge".


I'll give this a try.


Cheers