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

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

Type and Attributes

Amirtharaj_K
15-Moonstone

Type and Attributes

Hi Guys,

I am looking for a restriction on 'Reusable Attribute'.

1. For example, my attribute name is Test and its type is String.

2. Then i adding in WT Part, there we have a option Constraint. Right

3. Rule which i want only 3 digits required that mean i can use String Length, but i want only numberic not alphabet which constraint we can use on here.

 

Regards,

Aj

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Amirtharaj_K 

You can use String format

DDD like decimal decimal decimal

HelesicPetr_0-1707725783094.png

 

PetrH

View solution in original post

6 REPLIES 6

Hi @Amirtharaj_K 

You can use String format

DDD like decimal decimal decimal

HelesicPetr_0-1707725783094.png

 

PetrH

Thanks for the Replay @HelesicPetr 

 

Can you give me more details about String Format and also other types.

 

Regards,

Aj

Hi @Amirtharaj_K 

Check the help.

Attribute Constraint Rules

PTC recommends to user regular expression instead but if it works it is the easiest way how to add a format constraint.

PetrH

Thanks for sharing @HelesicPetr 

String Format i set 999

But if I add the String Format, box - it is so big that I can enter more than 3 numbers. However, if I finish, I will receive a notification. This method is good, but as I mentioned, we can use string length to set 3 digits. Only that much can be entered.

But the problem is both type we can enter numberic and alphabet.

 

Amirtharaj_K_0-1707728439687.png

 

Aj

If I combine both String length and String Format, it works. Thank you for your support. @HelesicPetr 

Can we restrict like when we enter alpha not to fill and if it's numberic mean fill, because i filled alpha then finish i got a notification. can we restrict before fill.

AJ

Hi @Amirtharaj_K 

OOTB It works as it works.

PetrH

Top Tags