Skip to main content
10-Marble
Jun 15, 2015 3:27 PM UTC
Question

How do you set a Document's Name in an OIR?

I would like to set the Document's name to the value of an attribute plus a suffix. Anybody have an example I can follow?

thx!

6 replies

1-Visitor
Jun 15, 2015 3:48 PM UTC
10-Marble
Jun 15, 2015 4:57 PM UTC

That allows me now to specify the rule and upload the OIR, but when I try to create a document, if I leave the name field blank, it specifies that it is a required field. If i give it a value, that is the value that appears after the document is created.

This is what I have added per the article

<AttrValue

    id="name"

    algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator"

    ignore="false"

    force="false"

    final="false">

    <Attr id="IBA|IBA_NAME"/>

    <Arg> - SOME VALUE</Arg>

  </AttrValue>

  <AttrConstraint

    id="name"

    algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints"

    ignore="false"

    force="false"

    final="false">

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

    </Value>

  </AttrConstraint>

Translate
1-Visitor
Jun 15, 2015 7:54 PM UTC

I remember seeing something on this and I think you need to make the OIR "aware" of the IBA(s) that you are using with VarDef and then using the value with VarRef.  Look in the Help Center under Syntax for Algorithm Arguments.

I have not used myself, so can not help you much beyond that.  I was trying to use "temporary" values rather than IBA's and never figured out how.

Translate
14-Alexandrite
Jul 1, 2016 2:51 PM UTC

Stephen,

Were you ever able to get this to work? I can't get past the name being required, so it doesn't for me. Plus, I'm trying this for a WtPart.

Translate