Skip to main content
1-Visitor
January 15, 2016
Solved

How to get a document number that should contains product context name

  • January 15, 2016
  • 1 reply
  • 1600 views


​Hi All,

one of my customers requirement is as follows

If he wants to create a document in XYZ product context, then while creating it, in number field if he manually enters 3434  then after creation of document, it should appear like ABC\1234\XYZ3434.

Where ABC\123 is static name which will be same for all documents and XYZ is the product context.

Can anyone suggest me how to achieve this ?

Regards,

Krishna Chaithanya

Best answer by BineshKumar1

You can modify the OIR and use "containerName" reference to do this.

<!-- Added by IS4522 REQID 897DF -->              

<AttrValue id="number" algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator">

<Arg>AR</Arg>

<Arg>-</Arg>

<Attr id="containerName"/>

<Arg>-</Arg>

<Arg>{GEN:wt.enterprise.SequenceGenerator:TRCW_seq:5:0}</Arg>

</AttrValue>

              

Thank you

Binesh Kumar

1 reply

1-Visitor
January 15, 2016

You can modify the OIR and use "containerName" reference to do this.

<!-- Added by IS4522 REQID 897DF -->              

<AttrValue id="number" algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator">

<Arg>AR</Arg>

<Arg>-</Arg>

<Attr id="containerName"/>

<Arg>-</Arg>

<Arg>{GEN:wt.enterprise.SequenceGenerator:TRCW_seq:5:0}</Arg>

</AttrValue>

              

Thank you

Binesh Kumar

1-Visitor
January 16, 2016

Hi Binesh,

Its working fine. Now getting Product Container Name in number field with WTDOCUMENTID_Seq sequence .Thanks a lot for sharing it.

But, I'd like to know whether it's possible to enter manual number which should append to Product Container name mentioned above instead of auto numbering ?

Regards,

Krishna Chaithanya