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

SUPPORT Q&A - how to get the project tree number

miffy - Monday, November 10, 2008 1:24 AM:

i want to get the number (the column name is 'N') front of the project tree

someone can help me to get it !! It seems don't exist in table of DB

thanks~



tstickel - Thursday, November 13, 2008 3:50 PM:

 Miffy;

The "N" property is not in the database, instead it is computed when the Project Tree is displayed.

Look at ..Innovator901InnovatorClientSolutionsProjectscriptsProjectTree.htm

This html file produces the Project Tree and it contains the following function:
------------------------------------------------------------------------------------------------
function initActNums()
{
//there is no sence to call initActNums second time untill project is saved (refreshed somehow)
  if (!isInitActNums)
  { 
    actNums = a.createXMLDocument();
    var result = a.applyMethod("GetActivitiesNumbers", "<rootWBS>" + wbsId + "</rootWBS>");
    actNums.loadXML(result);
  }
  if(projectItem.selectSingleNode("wbs_id//Item[@action]")) mergeActNums();
  isInitActNums = true;
}
------------------------------------------------------------------------------------------------


You can see that it calls the method, "GetActivitiesNumbers", and if you look at this method it contains
the following code:

------------------------------------------------------------------------------------------------
For i=0 To aNodes.Count-1
  awNode = CType(aNodes.Item(i),XmlElement)
  awNode.SetAttribute("number",i+1)
Next
------------------------------------------------------------------------------------------------

It is this code that is computing the "N" value.

 

Terry