Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Version: Windchill 12.1
Use Case: See the generated number
Description:
Hi,
My request is to set autonumbering for objects while giving the user the ability to modify, for that I'm following this article How to Turn on Autonumbering for CAD document but also allow override the number during Save As or Rename in Windchill PDMLink.
This is working and Windchill shows the label Generated, my question is it possible to let the user sees this number (during creation)?
Because the user can modify the number, it's worth letting him see the one generated to decide whether to modify it or not.
Thanks in advance,
#autonumbering #autonumber #numbering #numbering_schemes
Solved! Go to Solution.
Si Traik,
Set OIR as below
<AttrConstraint id="number" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
<Value algorithm="com.ptc.core.rule.server.impl.GetServerPreGeneratedValue"/>
</AttrConstraint>
Si Traik,
Set OIR as below
<AttrConstraint id="number" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
<Value algorithm="com.ptc.core.rule.server.impl.GetServerPreGeneratedValue"/>
</AttrConstraint>
@Fadel It's working and the same number showing is the one taking after creation.
Thanks Mr. Windchill 🫡 !
@Fadel appears to have a good solution. Give it a try. If you want to see the number it would have generated and you are using an Oracle sequence, I believe just seeing the number will burn that number. The next request will generate a new number in sequence. Correct me if I am wrong but validate that is ok with you.
Same with SQL Server. Once the number is displayed, it's already been 'used' up, even if the current screen is cancelled. Windchill requested the number and the database supplied it, regardless of Windchill decides to do (or not do) with it.