Skip to main content
11-Garnet
January 23, 2025
Question

Attribute Creation

  • January 23, 2025
  • 3 replies
  • 907 views

Version: Windchill 12.1

 

Use Case: Good day I am a newbie and I am trying to create a new attribute under "Type and Attribute Management Utility" where it has multiple values in one line. For example, it must read XXX-XXXX-XXXX-XX-XX when I run a report and the input when creating a new part must have 5 blocks(fields) in a row separated by a dash. Please give suggestions.


Description:

Good day
I am a newbie and I am trying to create a new attribute under "Type and Attribute Management Utility" where it has multiple values in one line. For example, it must read XXX-XXXX-XXXX-XX-XX when I run a report and the input when creating a new part must have 5 blocks(fields) in a row separated by a dash.
Please give suggestions.

3 replies

Community Moderator
January 23, 2025

Hello @Markh74,


Thank you for your question
Could you please share what you’ve tried so far and the outcomes?

 

Feel free to include any additional information that might be relevant and assist others in guiding you. Adding screenshots can also help us better understand what you’re trying to achieve.

 

Regards,

Vivek N
Community Moderation Team.

HelesicPetr
22-Sapphire II
22-Sapphire II
January 23, 2025

Hi @Markh74 

You can try to use a constraint String format for your String attribute or Regular Expression

Attribute Constraint Rules

Constraints Tab

 

try String format syntax as CCC-CCCC-CCCC-CC-CC

or

Regular expression syntax as ...-....-....-..-..

HelesicPetr_0-1737620992225.png

PetrH

 

 

18-Opal
January 27, 2025

@Markh74 

 

You gave a pattern of XXX-XXXX-XXXX-XX-XX

I have two questions:

  • Is X any uppercase alpha character or is this case insensitive?
  • Can X be a number?

Either way I'd use a regex constraint as @HelesicPetr has already mentioned.

 

FYI String Format constraint is a holdover from previous Windchill versions.  PTC recommends using Regex for new constraints.