cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

if you add a text into a string attribute field the number of characters and bytes should be shown

if you add a text into a string attribute field the number of characters and bytes should be shown

For string attribute fields you can have a string length constraint.

For example: String length constraint in the type and attribute manager = 0 - 4000

 

The system behavior of Windchill is following:

 

1)

If you enter ASCII characters (each with 1 byte) into the string attribute field and you reach more than 4000 characters it will show an error message that the string length constraint is reached (e.g. "The number of characters in this attribute value can be no more than 4000. The number of characters currently entered is 4001.").
If you copy/paste more than 4000 ASCII characters into the string attribute field and you type one more character it will show an error message that the string length constraint is reached (e.g. "The number of characters in this attribute value can be no more than 4000. The number of characters currently entered is 4132.").

= Validator for the number of characters.

 

2)

But if you have some Unicode characters with 2 Bytes in your text (e.g. Umlauts) and the number of characters is below 4000 but the number of bytes of the entered characters reaches more than 4000 bytes, another validator is used, but only if you press "save" or "check in" or "next" or "finish", depending on the used wizard. (e.g. "ATTENTION: Required information is missing or invalid attribute value(s) were found. The value for attribute <attribute name> violates the constraints defined for this attribute.").
= Validator for the number of bytes of the characters.

But with this validator the users don´t know how much characters or bytes they have to remove to fix the validation issue.

 

Suggestion:

 

either a) add the number of allowed and currently entered bytes into the error message,


or b) add two fields beside the attribute field which show in live how much characters and bytes are entered and mark them red if the maximum is reached