AnsweredAssumed Answered

advanced search share selectmany

Question asked by marco.altieri on Jan 18, 2011
Hi,

the following wiki page:

http://wiki.alfresco.com/wiki/Share_Advanced_Search#A_property_that_has_a_list-of-values_constraint_defined_against_it.

suggests to use selectmany.ftl:

<field id="my:lovproperty">
        <control template="/org/alfresco/components/form/controls/selectmany.ftl" />
</field>

to render the control for an attribute that has constraint defined against it.

I tried to use this approuch but it didn't work. I'm using an attribute defined (in custom content model):

<property name="no:status">
    <title>Status</title>
    <description>The Status that is relevant to this document</description>
    <type>d:text</type>
    <default>DRAFT</default>
        <index enabled="true">
            <atomic>true</atomic>
            <stored>false</stored>
             <tokenised>true</tokenised>
        </index>
        <constraints>
            <constraint ref="no:statusConstraint"/>
   </constraints>
</property>

where:


      <constraint name="no:statusConstraint" type="LIST">
         <parameter name="allowedValues">
            <list>
               <value>DRAFT</value>
               <value>APPROVED</value>
               <value>ARCHIVED</value>
            </list>
         </parameter>
      </constraint>
h
if the user select DRAFT and APPROVED, Share executes a lucene query with the constraint:

no:status:"DRAFT,APPROVED"
and does not find anything.

I tried to define the property as multivalue but it didn't work: no documents yet.

Am I doing something wrong?

Thanks,
Marco

Outcomes