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

Setting a default string value MBA / IBA attributes with OIR

Setting a default string value MBA / IBA attributes with OIR

Today, we can't apply default string value on MBA and IBA Date/String/... attributes with OIR because according to ptc, it's not compatible with GetServerPreGeneratedValue mode. (case 13297476)

3 Comments
Aquamarine

Setting a default string value by OIR

<AttrValue id="ptsERP" algorithm="wt.rule.algorithm.StringConstant">

<Arg>12345</Arg>

</AttrValue>

How to make string soft attribute immutable with a default value in Windchill

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS115839

Yes but our need is to display this default value with GetServerPreGeneratedValue mode and that doesn't work. Have you test this test case?

Aquamarine

1. Add the following Object Initialization Rule to your type (wt.part.WTPart)

<AttrValue id="ptsERP" algorithm="wt.rule.algorithm.StringConstant">

<Arg>12345</Arg>

</AttrValue>

<AttrConstraint id="ptsERP" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">

   <Value algorithm="com.ptc.core.rule.server.impl.GetServerPreGeneratedValue"/> 

</AttrConstraint>

2. Edit the following  %WT_HOME%\codebase\com\ptc\core\rule\server\delegate\init\RuleConfigurableTypeAttribute.properties.xconf:

   <Property name="wt.part.WTPart" default="number,name,ptsERP,lifeCycle,lifeCycle.id,teamTemplate,teamTemplate.id,folder.id,organization.id"/>

3. Run "xconfmanager -pF" in Windchill Shell and restart Windchill