This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Relationship row number

Yelena - Thursday, July 2, 2009 12:03 PM:

I would like to get the value  of the new relationship's  Row Number on the client site.  I can get the relationship: 

var thisItem = parent.thisItem;
var child = thisItem.getItemsByXPath("//Item[@id='" + relatedID + "']").getItemByIndex(0);
var thisRel = thisItem.getItemsByXPath("//Item[@id='" + relationshipID + "']").getItemByIndex(0);

But do not know how to get the row number. I need this to set a [name] property for the relationship item = [parent item name] + [thisRel row number];

 

 

 

 

Thank you

 

 

 



tstickel - Saturday, July 18, 2009 3:53 PM:

If thisRel is an relationship item, then thisRel.getProperty("sort_order") will return the row number.

Note that there is nothing in Innovator that requires that the row number be unique.  So if a user manually

sets a row number there could be duplicates.



Yelena - Monday, July 20, 2009 10:11 AM:

Thank you Terry.

The "Increment Sequence Number" ,method  that is used for Part BOM  and Document files gave me a perfect example of what I need. I only use this number to create a sequence number for related item.