Monday, December 11, 2017

How to create a Custom Numbering Sequence

Sometime we requires a custom numbering sequence to achieve the required functionality.

Here is the steps which has to be faollowed for creation of custom numbering sequences.

1. Open SQLPLUS.
2. Logged in by using Windchill DB user credentials.
3. Execute the below command in sqlplus.

SQL> exec wtpk.createSequence('<Sequence_Name>','<Starting_number>','<increment>');
here is example,

SQL > exec wtpk.createSequence('INDIAID_seq','5000','1');

        Here, INDIAID_seq - is a Sequence Name

                 5000 - is a starting number and 1 is an increment value.


How to Use this in OIR,

 Edit the oir xml file, and put below above sequence in number area as shown below,

<AttrValue id="number" algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator">
<Arg>{GEN:wt.enterprise.SequenceGenerator:INDIAID_seq:8:0}</Arg>
</AttrValue>



No comments:

Post a Comment

Windchill with HTTPS

Using below steps, we can configure Windchill to listen HTTPS connection. 1. Reconfigure Apache to use HTTPS (SSL). 2. Reconfigure Windch...