Showing results for 
Search instead for 
Do you mean 

Finding the Max size of a character field

New Member
Posts: 31
Country: USA

Finding the Max size of a character field

I'm getting into some problems putting data into ACT! Contact Fields due to size limitations. Is there

a way to find out the Max size of a field?


For example, below I find the first business line1 of a contact and I then want to put a value into that field.

However, if the field is too large, this will fail. Hence, I want to limit the amount of data that goes into the field.


Dim Field_Record_Object As Act.Framework.Contacts.ContactFieldDescriptor


Field_Record_Object = ACTFM.Contacts.GetContactFieldDescriptor("TBL_CONTACT.BUSINESS_LINE1", True)

Field_Record_Object.SetValue(ACT_Contact_Item, "A very Large field ...")


I need to be able to limit the field by the max size allowed in ACT! i.e.

Field_Record_Object.SetValue(ACT_Contact_Item, strings.left("A very Large field ...", MaxFieldSize))


How do I find the Maximum Field Size? I looked at all the properties of the ContactFieldDescriptor but did no find

anything re. field size. Am I missing something?


Thanx in advance...

Copper Contributor
Posts: 98
Country: United States

Re: Finding the Max size of a character field

I think you're looking for... 


FieldDescriptor _yourField; _yourField.Attributes[FieldProperty.Length] = new LengthAttribute(int.Parse(aString));



Pretty sure there is a 'getter' in there somewhere for the FieldProperty.Length.


I believe the same thing exists withing a ContactFieldDescriptor.

Carlton Jones
Sage Software
New Member
Posts: 31
Country: USA

Re: Finding the Max size of a character field

Thanx. I tried it and it works. Couldn't find the FieldProperty.Length definition so I reversed engineered the number (it is 1) and it worked fine then.