1Ci Support Help Center home page
Submit a request
Sign in
  1. 1Ci Support
  2. 1C:Enterprise Development Standards
  3. Creating and modifying metadata objects
  4. Data storage arrangement

Using string type attributes

  • Data storage arrangement
    • General data storage arrangement information
    • Refining the essence of a metadata object
    • Name, synonym, comment
    • Tooltip and filling check
    • Using configuration objects codes (numbers)
    • Using string type attributes
    • Restrictions on the use of composite type attributes
    • Requirements for posting documents
    • Using record activity
    • Register self-sufficiency
See more

Scope: managed applications, mobile applications, and ordinary applications.

1.1. For the most string attributes, set the Allowed length property to Variable and specify the maximum string length. If you need to make sure a string has a fixed length, set Allowed length to Fixed. The shorter values will be automatically appended with trailing spaces.

1.2. If the length of a attribute is standardized—for example, by the local regulation—set the maximum string length in the Length property (or in Description length for the Description attribute). For example, for the UK jurisdiction, the UTR attribute (unique taxpayer reference), which belongs to the Taxpayers catalog, has a fixed length of 10 digits.

1.3. If multiple strings are concatenated into a single string, the resulting string's length must be equal to the sum of the lengths of the joined strings. For example, the length of an address equals to the total length of its parts: country, city, street, and so on.

1.4. If the length of an attribute is not standardized, set the reasonable allowed length that would cover most common usage scenarios. For example, 250 characters is enough to store the name of a counterparty; 260 characters is the maximum length of a file name in common file systems; normally, the full name of an individual doesn't exceed 100 characters.

2. Some attributes require strings of unlimited length. For example:

• An attribute is provided to store user-defined text, which can contain arbitrary number of characters. Usually, such attributes are multiline fields. For example, Sales order has the Comment field, which the account manager can use to store the correspondence with the customer.

• An attribute is provided to store automatically-generated service data, which is not human-readable and used by data processing algorithms. For example, XML documents or email titles.

3. When you use attributes of unlimited length in queries, consider the recommendations and restrictions related to the 1C:Enterprise query language:

3.1. If you need to compare, group, or get unique values from attributes that contain unlimited-length strings, convert the values into strings of limited length.

To do so, it is recommended that you employ the CAST sentence. Example:

CAST AS STRING(1000)

3.2. For reports developed with Data Composition System (DCS), to convert unlimited-length strings, specify the field's Value type on the Data sets tab.

Note that excessive use of unlimited-to-limited string convertion in DCS reports and queries could be a sign of suboptimal application design. Consider redesigning some unlimited-length strings into limited-length strings. 

3.3. In other cases, converting is not required.

4. For print forms that contain string fields, ensure that the whole string is printed out regardless of the string's length. Otherwise, printed documents might miss some important information. For example, the house number in the address on a delivery note.

To get the list of all unlimited-length string attributes used in the application, run the UnlimitedLengthStrings.erf data processor.

See also:

  • Generating print forms
© 2020 1C INTERNATIONAL LLC www.1Ci.com Support policy