cancel
Showing results for 
Search instead for 
Did you mean: 

Repeating String attribute or custom functionality

jamen
Confirmed Champ
Confirmed Champ
Hi,

I am currently in the process of identifying some requirements for an Alfresco project I am working on.  An interesting situation has come up whereby a repeating field is required or an association needs to be made.

Basically a mode of printing needs to be encoded for a different set of books to be published.  These fields will have to be null or a value between 1-3.

Now what is required is that the attribute field names need to be that of the publication title name. 

eg.

Book Title X                              1
Book Title Two
Book title XYZ                           2

Now the entire row has to be dynamic, in that you can add another row to it at any time, eg. a property called 'Book Title Five', with a value of 1.

What is the best way of implementing this using the Alfresco content model.  One possible option is to only have one repeating string field with the values, and then a lookup table for all the different property names, where you would configure any display page to render the property names correctly against the respective row in the repeating field.

I have considered using a node association of some sort, but not sure about this.  Should I consider using the "any" type to use a custom object of some sort?

Lastly we have considered creating a new aspect for every book title, and having a "Book Identifier " field as part of the aspect.  However we may find it hard to justify the use of an aspect just for this.

Can anyone offere any recommendations?

Thanks in advanced
J
2 REPLIES 2

mikef
Champ in-the-making
Champ in-the-making
Not quite sure I understand the requirement, however, it sounds like you need to use maybe 1 (or possible 2) multi-value string properties. Please clarify!

jamen
Confirmed Champ
Confirmed Champ
Effectively it could be two repeating fields, where I define my web client to display the attributes side by side.  Whereby each book name has the print mode assigned next to it.

So on a document node I would want to have on the document properties page, the potential to add a new book name and have a "print mode" value assigned to it.  The question then is how should this be stored or how can this be accomodated in Alfresco. 

eg.

DOCUMENT PROPERTIES PAGE - Document xyz.doc

Name: Document xyz.doc
Subject: test case
Author: Joe Blogs

Books
Book xyz: 1
Book two:
Book Z: 5


Basically in the above example, each of the books are dynamically created, but they appear (on the web client) as if they are just another attribute on the properties page.  The values 1, 5 are chosen as a drop down of values (between 1 and 5).  At any time we would want to add another book so we can specify the print mode for the book.

There are reasons why I want to do this (dependencies in other parts of the system).  I'm basically gauging whether this easily achievable with Alfresco's content model etc without major customisation.  If not then it's a case of thinking of another way of satisfying functional requirements.

Thanks in advanced
Jamen