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

The PTC Community email address has changed to community-mailer@ptc.com. Learn more.

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

2 Comments
PTCModerator
Emeritus
Status changed to: Acknowledged
 
jarcher3
6-Contributor

Similar to this what I would like is it to be dynamic, meaning not having to hit Okay to determine the string is too long.

What would be nice is a Twitter-like dynamic check of a string entry that would start to highlight the extra characters that will not fit in the attribute string / text field. That way it is dynamically telling you where your string is too long (extra characters are highlighted in Red for example). 

 

So have the validator real-time during entry, not when you try to exit.

 

This will provide productivity gains, especially when a dialog has many text fields to be entered.

TwitterStringExceedIndication.gif