<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #000000"><div>Hello.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>I have Organization Structure in MidPoint, so each new child created in tree will have assignment of parent Org.<br data-mce-bogus="1"></div><div>Is it possible to get data from parent Org attribute to use in mapping?<br data-mce-bogus="1"></div><div>Currently each Org has extension attribute adOUPath that refers to OU path in AD ( OU=Org1,OU=Org2,OU=Org3 etc.).<br data-mce-bogus="1"></div><div>When new child is created, I want to take parentOrg's adOUPath value and map it to child's attribute. <br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>What I already tried is:<br></div><div>    <mapping><br>      <strength>weak</strength><br>      <name>Org OU path from assignment mapping</name><br>        <source><br>            <path>$focus/focusAssignment/extension/adOUPath</path><br>        </source><br>        <source><br>            <path>$focus/name</path><br>        </source><br>        <expression><br>        <script><br>          <code><br>            log.info("adOUPath is " + adOUPath);<br>            if(adOUPath!=null){<br>            newPath = "OU=" + name + "," + adOUPath;<br>            return newPath;<br>            }<br>          </code><br>        </script><br>      </expression><br>      <target><br>        <path>$focus/extension/adOUPath</path><br>      </target><br>    </mapping><br><br></div><div>In part of  </div><div><!--StartFragment--><source><br>            <path>$focus/focusAssignment/extension/adOUPath</path></div><div></source><!--EndFragment--> <br data-mce-bogus="1"></div><div>I have tried different variables: assignment[0], immediateAssignment, immediateRole and all result in null<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Thanks in advance.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div></div></body></html>