AnsweredAssumed Answered

Metadata template for showing assocs data

Question asked by cesarista on Nov 20, 2014
Latest reply on Nov 20, 2014 by cesarista
Hi everybody:


I created a content model with one aspect with an assocciation to cm:person (very similar to bpm:assignee in fact i call it zpm:assignee). I can use it with other properties in documents in Share normaly. Then I defined an evaluator for this aspect and a metadata template. I wanted a metadata template that could show the "userName" of the objet person asigned to that aspect/association. No problem when accesing and rendering to other properties. Is it possible?


This is my metadata template:

 
(function()
{
   /**
    * Alfresco Slingshot aliases
    */
   var $html = Alfresco.util.encodeHTML,
   isValueSet = Alfresco.util.isValueSet;

   if (Alfresco.DocumentList)
   {
        YAHOO.Bubbling.fire("registerRenderer",
         {
           propertyName: "zzzz",
           renderer: function content_renderer(record, label)
           {
              var jsNode = record.jsNode,
              properties = jsNode.properties,
              html = "";
              mystatus   = properties["zpm:mystatus"] || "";
              priority   = properties["zpm:priority"] || "";
              percent    = properties["zpm:percentComplete"] || "";
              // I DO NOT KNOW HOW TO ACCESS THIS OBJECT –> zpm:assignee
              //assigned   = ??????
              assigned   = "";
              html = '<span class="item">Estado: <b>' + mystatus + '</b>';
              html = html + 'Priority: <b>'+ priority +'</b>';
              html = html + 'Percent : <b>'+ percent +' %</b>';
              html = html + 'Asigned to: <b>'+ assigned +'</b>';
              html = html + '</span>';
              return html;
          }
      });
   }
})();


I am using 4.2.3 Enterprise.

Thanks in advance.

–C.

Outcomes