Question
Substring function for "folder.id" in OIR
Hi All,
I'm trying to get a substring of the "folder.id" attribute of a WTPart. I'm using the below OIR code and I'm getting a failure with the IndexOf algorithm. Does anyone have an example where you use IndexOf as a parameter to Substring? Please don't send the one from the Help, I've already seen it.
<attributevalues objtype="wt.part.WTPart">
<attrvalue id="lifeCycle.id" algorithm="com.ptc.core.foundation.lifecycle.server.impl.LifeCycleTemplateAttributeAlgorithm">
<value algorithm="wt.rule.algorithm.BooleanBranch">
<value algorithm="wt.rule.algorithm.StringEqualsTest">
<value algorithm="wt.rule.algorithm.Substring">
<attr id="folder.id"/">
<value algorithm="wt.rule.algorithm.IndexOf"> <-- This algorithm is causing the OIR to fail. If I hard code to an integer then it works.
<attr id="folder.id"/">
<arg>Manufacturing</arg>
<arg>0</arg>
</value>
<value algorithm="wt.rule.algorithm.LastIndexOf"> <-- This algorithm is causing the OIR to fail. If I hard code to an integer then it works.
<attr id="folder"/">
<arg>Manufacturing</arg>
</value>
</value>
<arg>Manufacturing</arg>
</value>
<arg>Steelcase Eng B Life Cycle</arg>
<arg>Steelcase Eng Life Cycle</arg>
</value>
</attrvalue>
</attributevalues>
Patrick Williams | Engineering Systems | c: 616.947.2110
[cid:image001.jpg@01D072B4.2CC608C0]
I'm trying to get a substring of the "folder.id" attribute of a WTPart. I'm using the below OIR code and I'm getting a failure with the IndexOf algorithm. Does anyone have an example where you use IndexOf as a parameter to Substring? Please don't send the one from the Help, I've already seen it.
<attributevalues objtype="wt.part.WTPart">
<attrvalue id="lifeCycle.id" algorithm="com.ptc.core.foundation.lifecycle.server.impl.LifeCycleTemplateAttributeAlgorithm">
<value algorithm="wt.rule.algorithm.BooleanBranch">
<value algorithm="wt.rule.algorithm.StringEqualsTest">
<value algorithm="wt.rule.algorithm.Substring">
<attr id="folder.id"/">
<value algorithm="wt.rule.algorithm.IndexOf"> <-- This algorithm is causing the OIR to fail. If I hard code to an integer then it works.
<attr id="folder.id"/">
<arg>Manufacturing</arg>
<arg>0</arg>
</value>
<value algorithm="wt.rule.algorithm.LastIndexOf"> <-- This algorithm is causing the OIR to fail. If I hard code to an integer then it works.
<attr id="folder"/">
<arg>Manufacturing</arg>
</value>
</value>
<arg>Manufacturing</arg>
</value>
<arg>Steelcase Eng B Life Cycle</arg>
<arg>Steelcase Eng Life Cycle</arg>
</value>
</attrvalue>
</attributevalues>
Patrick Williams | Engineering Systems | c: 616.947.2110
[cid:image001.jpg@01D072B4.2CC608C0]

