Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
I have a situation where a particular field on our Change Request has different choices depending on which project they are part of. Using Global Enumerations, I can set up the cascading dependencies to show the correct choices. But... having to choose the project first on creation is something I'd like to avoid. Each of our projects have their own contexts... if you create a CR in PRJ1-Library, I want the project field choice preset and the dependent field's valid choices already filtered.
I can use the OIR to set the project field but it only happens after the create form is submitted. Can this be preset so the create form already has the correct project?
(I am trying to avoid writing custom code and handlers... please let me know if this a forlorn hope...)
Solved! Go to Solution.
as far as I know this needded anyways here is how my OIR looks :
you can use OIR constraint to prepopulate the value https://support.ptc.com/help/wnc/r12.1.1.0/en/index.html#page/Windchill_Help_Center/ProEWCInteg/ProEWCIntegOIRNameNumbSetPregenEd.html#
Unfortunately that did not work. The OIR rule did get applied but only after the Change Request was submitted. All of the examples in the above link are for naming and numbering... can they be used on IBA attributes?
The rule I used is as follows:
<AttributeValues objType="wt.change2.WTChangeRequest2|com.lmco.MS2ChangeRequest">
<AttrValue id="InternalProgram" algorithm="wt.rule.algorithm.StringConstant">
<Arg>CSC</Arg>
</AttrValue>
<AttrConstraint id="InternalProgram" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
<Value algorithm="com.ptc.core.rule.server.impl.GetServerPreGeneratedValue"/>
</AttrConstraint>
</AttributeValues>
Have you added the internal name of the attribute in the RuleConfigurableTypeAttribute.properties file + server restart to make it usable with OIRs , jut test it it is working on 12.0.2.15
I did not do that and I will try. Is this necessary for IBA attributes? The rule does work... but only after the object is created. It refuses to apply itself before the form is displayed.
as far as I know this needded anyways here is how my OIR looks :