Hi All, I am trying to get level from Xclassification tree can you suggest any way to get that whole path.

please find attached screenshot for your reference i need to get the whole path under level tag from classification tree,
  

Parents
  • Hi

    You want to create a classification for Itemtype in this manner or you need this way of heirarchy in Relationship Tab?

    Thanks

    Abhishek 

  • Hi,

    You are asking a good question and I'm not sure how to do it yet.

    xClassifcationTree does not use relationship to manage the structure.

    The challenge here is to be able to access and filter the data in the property;

         xClassifcationTree.classification_hierarchy.

         ?? Is there a Utility or code set available to manage this??

    This would be need to be accessed/used if you want to:

      1) Change the xClass Tree order; as you develop the tree.

      2) Programmatically get the path

      >>> I tried re-setting the xClass.sort_order in the SQL tables but it did not work.

    What I am trying to get around this complication is to set the name of the xClass nodes as the path.

    "Packaging"

       "Packaging_Carton"

            "Packaging_Carton_Tube"

    I'm also setting the leaf node label "Packaging \ Carton \ Tube"

         This also makes the selected class easier to read when set on Part, Document, CAD, etc

    Both cases the there is a delimiter: "_" (Hierarchy) and " \ " (Hierarchy)

    The Data model allows 128 characters for the Label and 64 for the name.

    To support the discussion I have added 2 snaps below. (I think they are pretty close)

    Data Model:

    Javascript Model:

    I hope this helps to support the conversation.

    Regards

    Scott

  • Here is a corrected data model.

    Also. I proved out, manually, that the order of the presentation of the xClass is managed by the classification_hierarchy property values.

  • Manual testing allowed me to confirm that the values of the classification_hierarchy field control the xClass display order.  geometry dash

  • I have written a SQL Procedure to Alphabetize the top level xClass Nodes, those who's "FromId"
    equals the id of the [xClassificationTree] item, that works great. So you can do it programmatically.

    I have not created any yet to get the path of a specific full path of a leaf node but I think this will be required later by trying to use the OOTB javascript code shown above. 

Reply
  • I have written a SQL Procedure to Alphabetize the top level xClass Nodes, those who's "FromId"
    equals the id of the [xClassificationTree] item, that works great. So you can do it programmatically.

    I have not created any yet to get the path of a specific full path of a leaf node but I think this will be required later by trying to use the OOTB javascript code shown above. 

Children
No Data