cancel
Showing results for 
Search instead for 
Did you mean: 

Custom data list

srowsell
Champ in-the-making
Champ in-the-making
I've been creating a custom data list, and I want to be able to select any combination of users and groups for two properties.  The model is shown below.

For the first Association I have set the target class to be cm:cmobject, but I know that that isn't what I want it to be.  I need it to be able to select zero or more groups.  I've tried something like "cm:group" for this field, but that doesn't appear to be an actual thing.

Does anyone know the correct class to use here?


<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model xmlns="http://www.alfresco.org/model/dictionary/1.0" name="reportdl:reportRecipientsDatalist">
   <!– Optional meta-data about the model –>
   <description>Reports Data List</description>
   <author>Steve Rowsell</author>
   <version>1.0</version>
   <!– Imports are required to allow references to definitions in other models –>
   <imports>
      <!– Import Alfresco Dictionary Definitions –>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
      <!– Import Alfresco Content Domain Model Definitions –>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
      <!– Import Alfresco Data List Model Definitions –>
      <import uri="http://www.alfresco.org/model/datalist/1.0" prefix="dl" />
   </imports>
   <!– Introduction of new namespaces defined by this model –>
   <namespaces>
      <namespace uri="com.duca.reports.datalist" prefix="reportdl" />
   </namespaces>
   <constraints>
      <constraint name="reportdl:departments" type="LIST">
         <parameter name="allowedValues">
            <list>
               <value>Accounting</value>
               <value>Audit</value>
               <value>Credit Administration</value>
               <value>Credit Management</value>
               <value>Deposits</value>
               <value>Facilities</value>
               <value>Human Resources</value>
               <value>Investment Solutions</value>
               <value>IT</value>
               <value>Marketing</value>
               <value>Operations</value>
               <value>Property Leases</value>
               <value>Sales &amp; Service</value>
            </list>
         </parameter>
      </constraint>
      <constraint name="reportdl:frequencies" type="LIST">
         <parameter name="allowedValues">
            <list>
               <value>Daily</value>
               <value>Weekly</value>
               <value>Bi-Weekly</value>
               <value>Monthly</value>
               <value>Bi-Monthly</value>
               <value>Semi-Annually</value>
               <value>Annually</value>
               <value>On Demand</value>
            </list>
         </parameter>
      </constraint>
   </constraints>
   <!–      T Y P E   D E F I N I T I O N S      –>
   <types>
      <!–   Data list defintions For this model go here –>
      <type name="reportdl:reportRecipientsDatalist">
         <title>Reports Data List</title>
         <description>Report Recipients Data List</description>
         <parent>dl:dataListItem</parent>
         <properties>
            <property name="reportdl:department">
               <title>Department</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
               <constraints>
                  <constraint ref="reportdl:departments" />
               </constraints>
            </property>
            <property name="reportdl:reportName">
               <title>Report Name</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
            </property>
            <property name="reportdl:frequency">
               <title>Report Frequency</title>
               <type>d:text</type>
               <mandatory>true</mandatory>
               <constraints>
                  <constraint ref="reportdl:frequencies" />
               </constraints>
            </property>
            <property name="reportdl:suffixOne">
               <title>Suffix One</title>
               <type>d:text</type>
               <mandatory>false</mandatory>
            </property>
            <property name="reportdl:suffixTwo">
               <title>Suffix Two</title>
               <type>d:text</type>
               <mandatory>false</mandatory>
            </property>
         </properties>
         <associations>
            <association name="reportdl:recipientGroup">
               <title>Recipient Group</title>
               <source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>
               <target>
                  <class>cm:cmobject</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
            </association>
            <association name="reportdl:recipientUser">
               <title>Recipient User</title>
               <source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>
               <target>
                  <class>cm:person</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
            </association>
         </associations>
      </type>
   </types>
</model>
2 REPLIES 2

lementree
Champ on-the-rise
Champ on-the-rise
Hi,

to select groups as association the class should be <strong>cm:authorityContainer</strong>

srowsell
Champ in-the-making
Champ in-the-making
That got it.  Thank you sir, you are a gentleman and a scholar.


Steve