The String attribute type supports unformatted string values. New lines are not displayed.
Users are provided with an input field where they can enter plain text.
When creating an attribute of type String, the only requirements are a SID and a Name.
Valid Data Types: Single, Array
Support for Default Value: Yes, for single
Allows empty value: Yes
Configurable Editor: Yes, width, but not height
Setting a Regular Expression Pattern
The String attribute type includes an option for specifying a regular expression which constrains* legal values of the string attribute. Illegal values will be enforced or indicated with a warning symbol in the swExplorer immediately as they are set:
Regular expression is a format for describing valid text strings. You can read more about the format in Regular Expression.
In the below example, a valid string begins with a capital letter followed by a sequence of letters (capital or lower case) and numbers. A maximum of 42 characters in total is allowed.
Things to Consider
- A String "Single" type attribute can be changed to a Text "Single" type attribute, but it is not possible with "Array" data dimension.
- For String attributes in CMS Projects, you cannot change the data type from String if the attribute type is change-tracked.
- In a String attribute editor, the word wrap functionality is shut off to represent the "string" type properly since it is one line. If other editing options are desired, consider a RVF or Text attribute type. Otherwise, consider widening the width a bit further to view more or all of the string value.