Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
There is a attribute defined on a document type, the value is carried over by new iteration or revision once it was created out of box. How can I custom to not carry over the value but reset to empty every time new revision? Eg Audit Type field was set "Initial" at A.1, new iteration to A.2 the value carried over. However when Revise to B.1, the value was reset to empty.
Solved! Go to Solution.
You need to write a NEW_VERSION Listener
See following example
// Get the event (NEW_VERSION)
VersionControlServiceEvent pmEvent = (VersionControlServiceEvent) event;
Workable target = (Workable) pmEvent.getEventTarget();
if (!WorkInProgressHelper.isCheckedOut(target)) {
// Here reset your attribute
}
You need to write a NEW_VERSION Listener
See following example
// Get the event (NEW_VERSION)
VersionControlServiceEvent pmEvent = (VersionControlServiceEvent) event;
Workable target = (Workable) pmEvent.getEventTarget();
if (!WorkInProgressHelper.isCheckedOut(target)) {
// Here reset your attribute
}
This behavior has been introduced in 11.2 for the save-as, not sure about the revise.
Reset attribute values during "save as" & revise
@JenniferPierron: any comment on this?
Hello Florent.
In Windchill 11.2, the Save As UI has been enhanced to allow editing of attributes.
The end user can set, modify and unset values of attributes in the UI where allowed.
Modifying Attributes during Save As Action
Revise has not been changed as of yet.
Cordially,
Jennifer Pierron
This is really going to be useful. I'm setting up views to contain this now and will let my users know.