There are problems where index of etc works only in certain scopes where
folder.id is null and at other points you do see the value. I just
customize my own algorithm. Fairly basic code you almost never have to
worry about in an upgrade.
On Apr 9, 2015 10:59 AM, "Williams, Patrick" <->
wrote:
> 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"<br"/>> algorithm="com.ptc.core.foundation.lifecycle.server.impl.LifeCycleTemplateAttributeAlgorithm">
>
> <value<br/>> algorithm="wt.rule.algorithm.BooleanBranch">
>
> <value<br/>> algorithm="wt.rule.algorithm.StringEqualsTest">
>
> <value<br/>> 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
>
> [image: sc_inc_black_sig_1_alt]
>
>
>