Skip to main content
10-Marble
June 15, 2015
Question

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

  • June 15, 2015
  • 6 replies
  • 2870 views

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
June 15, 2015
10-Marble
June 15, 2015

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>

1-Visitor
June 15, 2015

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.

14-Alexandrite
July 1, 2016

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.