<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Getting properties from content model in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/getting-properties-from-content-model/m-p/133910#M36051</link>
    <description>&lt;P&gt;Try with :&lt;/P&gt;&lt;PRE&gt;ambito = space.properties["refinterna:ambito"];
ano = space.properties["refinterna:ano"];
ultimonumero = space.properties["refinterna:ultimonumero"];
document.name = ambito + "_" +  ano + "_" + ultimonumero + ".pdf";
document.save()&lt;/PRE&gt;</description>
    <pubDate>Sat, 11 Nov 2023 17:25:33 GMT</pubDate>
    <dc:creator>sherrymax1</dc:creator>
    <dc:date>2023-11-11T17:25:33Z</dc:date>
    <item>
      <title>Getting properties from content model</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/getting-properties-from-content-model/m-p/133908#M36049</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I was wondering how can I get the values of the properties I've created on a custom aspect from a JS script that will be executed by a rule.&lt;/P&gt;&lt;P&gt;So, for example, I have the &lt;STRONG&gt;mc:refinterna&lt;/STRONG&gt; aspect which has three properties: &lt;STRONG&gt;ambito&lt;/STRONG&gt;, &lt;STRONG&gt;ano&lt;/STRONG&gt; and &lt;STRONG&gt;ultimonumero&lt;/STRONG&gt;. I've added this aspect to a space and I want to retrieve the three properties from a script and change the name of the document I'm uploading based on those properties.&lt;/P&gt;&lt;P&gt;Here is my script:&lt;/P&gt;&lt;PRE&gt;ambito = space.properties["refinterna:ambito];
ano = space.properties["refinterna:ano];
ultimonumero = space.properties["refinterna:ultimonumero];
document.name = ambito + "_" +&amp;nbsp; ano + "_" + ultimonumero + ".pdf";
document.save()&lt;/PRE&gt;&lt;P&gt;When I upload a document it is saved as null_null_null.pdf, so clearly I'm not referencing the properties correctly.&lt;/P&gt;&lt;P&gt;Can anyone please help me with this?&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Pedro&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 10:42:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/getting-properties-from-content-model/m-p/133908#M36049</guid>
      <dc:creator>pmeireles</dc:creator>
      <dc:date>2023-11-10T10:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting properties from content model</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/getting-properties-from-content-model/m-p/133909#M36050</link>
      <description>&lt;P&gt;How you are adding aspect and properties to document?&lt;/P&gt;&lt;P&gt;During upload By default that aspect is not added.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Nov 2023 03:55:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/getting-properties-from-content-model/m-p/133909#M36050</guid>
      <dc:creator>sp2</dc:creator>
      <dc:date>2023-11-11T03:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Getting properties from content model</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/getting-properties-from-content-model/m-p/133910#M36051</link>
      <description>&lt;P&gt;Try with :&lt;/P&gt;&lt;PRE&gt;ambito = space.properties["refinterna:ambito"];
ano = space.properties["refinterna:ano"];
ultimonumero = space.properties["refinterna:ultimonumero"];
document.name = ambito + "_" +  ano + "_" + ultimonumero + ".pdf";
document.save()&lt;/PRE&gt;</description>
      <pubDate>Sat, 11 Nov 2023 17:25:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/getting-properties-from-content-model/m-p/133910#M36051</guid>
      <dc:creator>sherrymax1</dc:creator>
      <dc:date>2023-11-11T17:25:33Z</dc:date>
    </item>
  </channel>
</rss>

