cancel
Showing results for 
Search instead for 
Did you mean: 

List of dependent files stored in metadata

d_franz
Champ on-the-rise
Champ on-the-rise
Hello!

I'm want to store a links or IDs of dependent or related content of a file to its metadata. Best would be that this data would be checked recursive, so I can get a dependency list over several file levels.
I have searched many posts for such a function but haven't found a solution.
5 REPLIES 5

Not applicable
Hey d_franz,
I think you have to define a peer association in your model http://wiki.alfresco.com/wiki/Data_Dictionary_Guide#Peer_.28Non-Child.29_Associations. The association comprises the link to the related content. If you write an action for example you could evaluate the association and do what ever you want.
Greets Christian

d_franz
Champ on-the-rise
Champ on-the-rise
I followed the example step by step. But I cannot see any new field or Type in Share.

Is it possible to show a menu to select a file of site or Repository and set it as an association file?

Not applicable
Hi,

I defined a type "wenz:qms" with an association to a doc from the same type:

      <type name="wenz:qms">
         <title>QMS-Dokumente von PPI</title>
         <parent>wenz:content</parent>
         <properties>
            <property name="wenz:gueltig_ab">
               <type>d:date</type>
            </property>
            <property name="wenz:gueltig">
               <type>d:boolean</type>
            </property>
         </properties>

         <associations>
                                <association name="wenz:verknuepft_mit">
               <source>
                  <mandatory>false</mandatory>
                  <many>false</many>
               </source>
               <target>
                  <class>wenz:qms</class>
                  <mandatory>true</mandatory>
                  <many>false</many>
               </target>
       </association>
      </associations>
         
      </type>      

Further on I customized share in order to show the association in share:
  <config evaluator="node-type" condition="wenz:qms"> 
    <forms>
      <form>
        <field-visibility>
          <show id="wenz:gueltig" />
          <show id="wenz:gueltig_ab" />
          <show id="wenz:verknuepft_mit" />
          <show id="cm:modified" />
          <show id="cm:modifier" />
          <show id="cm:name" for-mode="edit"/>
          <show id="cm:title" for-mode="edit" force="true" />
          <show id="cm:description" for-mode="edit" force="true" />
          <!– tags and categories –>
          <show id="cm:taggable" for-mode="edit" force="true" />
          <show id="cm:categories" for-mode="edit"/>
        </field-visibility>
      
        <appearance>
          <set id="qms" appearance="bordered-panel" label="QMS" />
          <field id="wenz:gueltig_ab" label-id="prop.wenz_gueltig_ab" set="qms"/>
          <field id="wenz:verknuepft_mit" label-id="assoc.wenz_verknuepft_mit" set="qms"/>
        </appearance>

      </form>

    </forms>


Doing so you get a control field for choosing the associated file when editing the document properties.
For nice formatting of the document link you have to create a field template.
Hope it helps

Greetings Christian

d_franz
Champ on-the-rise
Champ on-the-rise
Thank You very much! Now it works. So I can select related files to a List.

Is it possible to show a warning with a List of all associated files, also the associated files of the associated files, in case of deleting a file??

Not applicable
Hey, I'm sure it is possible but ad hoc I can't tell you how. If you work with child dependencies you should see a message when you try to delete the file. Search the related GUI sources and modify them in order to show all associated files.