Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Translate the entire conversation x

Attribute Creation

Markh74
11-Garnet

Attribute Creation

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 3

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
(To:Markh74)

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

 

 

@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.

Announcements
Top Tags