Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revisionBoth sides next revision
72:custom_report_tipsandtricks_retrieving_element [2019/02/07 13:49] – created ext-bkkr72:custom_report_tipsandtricks_retrieving_element [2019/03/08 18:57] ext-bkkr
Line 1: Line 1:
 ====== Retrieving the Parent Element Path ====== ====== Retrieving the Parent Element Path ======
  
 +**Function to Retrieve the Parent Element Path**
 +
 +<code>
 +function getParent(myelement) {
 + var path = "";
 + do {
 + var parent =
 +
 + myelement.getEntities("hierarchy::HIERARCHIC@LOCAL,targetrole=parent");
 +
 + if (parent[0].getProperty("IndexMode") == 1) {
 + return (path);
 + }
 + if (path =="")
 + path = parent[0].getProperty("DisplayName");
 + else
 + path = parent[0].getProperty("DisplayName") + " | "+path;
 + myelement = parent[0];
 + } while (parent[0].getProperty("IndexMode") != 1);
 + return (null);
 +}
 +</code>