Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hello everyone, can you please tell me how can I add a prefix to an autogenerated number?
How to get this number: ABC.000_018_5268?<AttributeValues objType="wt.part.WTPart">
<AttrConstraint id="number" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
<Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint"/>
</AttrConstraint>
</AttributeValues>
set the number to a generated number-->
<AttributeValues objType="wt.part.WTPart">
<AttrValue id="number" algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator">
<Arg>ABC</Arg>
<Arg>{GEN:wt.enterprise.SequenceGenerator:PROMOTIONNOTICEID_seq:7:0}</Arg>
</AttrValue>
</AttributeValues>
Sorry, that was for a promotion request, not a new part. Here is the code for a new part.
set the number to a generated number-->
<AttributeValues objType="wt.part.WTPart">
<AttrValue id="number" algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator">
<Value algorithm="wt.rule.algorithm.BooleanBranch">
<Arg>PREFIX</Arg>
<Arg>{GEN:wt.enterprise.SequenceGenerator:WTPARTID_seq:10:0}</Arg>
</Value>
</AttrValue>
</AttributeValues>