cancel
Showing results for 
Search instead for 
Did you mean: 

customModel.xml - default values to property with <multip

friedman30
Champ in-the-making
Champ in-the-making
Hi,

I have this property set in customModel.xml :


<property name="custom:Keywords">
      <title>Keywords</title>
       <type>d:text</type> 
       <multiple>true</multiple>
       <index enabled="false"></index>                                
</property>

I want to add default values (more than one) to this property.
How can i do that??  :?: 

:arrow: (when i tried adding values using the javascript API i could only add one value but not an Array of values)

thanks,

Dror
1 REPLY 1

friedman30
Champ in-the-making
Champ in-the-making
Found the answer !! Smiley Very Happy

This is how it is done (using the javascript API):

For every content that goes into Alfresco run this:


var keywords = new Array("word1", "word2");      
     file.properties["custom:Keywords"] = keywords;
     file.save();

Thats it  :wink:

Dror