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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Disable the Auto-numbering (for one document only)

lgrant
15-Moonstone

Disable the Auto-numbering (for one document only)

Anyone know how to turn off auto-number in the OIR for just that one document type?

All the other documents within the context are auto-number but as this is a "Special Project" number that has historical significants, I need to allow Doc Control to create the document and enter the number.

The OIR attached has a 4 digit number with SP on the front.

Thanks for your help.

4 REPLIES 4
g_prajeesh
4-Participant
(To:lgrant)

Hi,

If you are using a separate subtype of WTDocument, you can achieve that using OIR easily. Otherwise if you have an attribute to differentaite, you can use if else in OIR.

If you can tell me the scenario, I can get the OIR for you

You should use the OIR like follow:

<AttributeValues objType="wt.doc.WTDocument|yuorSoftType">

<!-- turn off auto-numbering -->

<AttrConstraint id="number"

algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

</AttrConstraint>

</AttributeValues>

Recently I cleaned up and refined all our OIRs, eliminating redundancy and documenting thoroughly. Had to accomodate a few special cases. We use both autonumber and manual numbering - for auto, we use a lot of prefixes and suffixes.

For OIR's and Numbering, I looked thru all the PTC on-line help in Windchill, and then all the PDF's, and then all the case solutions and other knowledge base articles about how to disable / enable autonumbering - and found no less than 37 places where it's specified how to do this - each with slight variations a little different intention. I tried most of them - some work, some don't. A lot have typos. None really take into account the fact that you may override Org vs. Site; Library vs. Org, etc. Sitting down to read all the PTC info about OIR's and numbering in one shot results in a lot of scrambled brain cells - but the summary can fit on 1/2 page.

We tried various major approaches to OIRs and discussed many times:

- Make changes at Site

- Leave Site alone and for any overrides, create at Org

- Include all elements at Org (e.g. Number, Folder)

- Include only the elements that are overridden <<< this is the major way we have these now

- Use Product/Library OIR's only for special cases

- Given Org-level for most of PDM, create in each Project also to carefully control Project behavior (include in Project templates)

/////

By the way, I recently updated our query builder report on OIR's - allows one to gather all OIR code in one place - either for all types or an entered type / type root. Helps us quite a bit. It's especially helpful if you have OIR's for a type that selectively override - e.g. for WTPart, one at Site, one at Org for the root type, one at Org for a subtype, one in a special Library for the root type, etc. QML for this attached - hopefully will be helpful.

lgrant
15-Moonstone
(To:lgrant)

Thanks everyone for the info.

Had PTC support work on it for anout an hour and they updated the OIR and added it back in at the Libray level.

The OIR calls out the Soft type

<AttributeValues objType="wt.doc.WTDocument|com.name.nam.SpecialProject">

Then to ignore the "number"

<!-- set the number to a generated number -->

Seems to work.

Announcements


Top Tags