Hi Andre,
I tried all options: options, suggest and operator...but doesn't work.

In my search.xml i write:
    <searchitem name="monumenti_pericolo" description="Monumenti">
        <layer type="shape" name="monumenti_pericolo">
            <field type="s" name="tipologia" description="Tipo" wildcard="0" />
            <field type="s" name="fattibilit" description="Classe sismica" 
wildcard="0" />
        </layer>
    </searchitem>
and i do get "Tipo" and "Classe sismica" as options under "Monumenti". I can 
perform simple queries referred to EITHER "Tipo" OR "Classe sismica" BUT i can 
not do a multiple query which includes "Tipo" AND "Classe sismica" (for example 
i want to highlight only those churches within sismic class=3). Notice that the 
attributes of "Tipo" and "Classe sismica" belong to the "tipologia" and 
"fattibilit" fields of the "monumenti_pericolo" shapefile. Do i necessarily 
need a database for my multiple query to work, or can this be achieved with 
simple shapefile?

Thanks a lot
Stefano
 


> Date: Fri, 21 Mar 2008 09:40:48 +0100
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> CC: [email protected]
> Subject: Re: [pmapper-users] multiple search
> 
> Stefano,
> 
> There are samples in the wiki, see
> http://svn.pmapper.net/trac/wiki/DocManualsearch
> It looks to me, that you have to put the field tags both in one layer
> tag. 
> 
> Like:
>     <searchitem name="cities_options_suggest_dbf" description="Cities
> Options Suggest">
>         <layer type="shape" name="cities10000eu">
>             <field type="s" name="ISO2_CODE" description="Country"
> wildcard="2">
>                 <definition type="options" connectiontype="dbase"
> sort="asc" firstoption="*">
>                     <dbasefile encoding="UTF-8" keyfield="ISO2_CODE"
> showfield="NAME">$/countries.dbf</dbasefile> 
>  
> <events>onchange="resetSuggestCache();$('#pmsfld_NAME').val('')"</events
> > 
>                 </definition>
>             </field>
>             <field type="s" name="NAME" description="City" wildcard="2">
>                 <definition type="suggest" connectiontype="dbase"
> minlength="1" startleft="1" dependfld="ISO2_CODE">
>                     <dbasefile encoding="UTF-8"
> searchfield="NAME">$/cities10000eu.dbf</dbasefile> 
>                 </definition>
>             </field>
>         </layer>
>     </searchitem>
> 
> 
> 
> 
> Now you start a second layer tag for the second search field, which you
> should not do. 
> 
> Eg:
> 
>     <searchitem name="geologia" description="Geologia">
>         <layer type="shape" name="geologia">
>             <field type="s" name="FORMAZIONE" description="Formazione"
> wildcard="0" />
>             <field type="s" name="ETA" description="Eta"  wildcard="0"
> />
>         </layer>
>     </searchitem>
> 
> Are those 2 fields dependant? Then you can even use suggest lists or
> option lists that are dependant of each other. You don't have to use
> that, you can strip the suggest lists or options lists and use plain
> text input fields, like above. Please play around with wildcard
> settings.
> Maybe you want to use the attribute "operator" which can be AND or OR,
> which is an attribute of the FIELD element, see the xsd schemadefinition
> in
> http://svn.pmapper.net/trac/browser/pmapper/trunk/incphp/query/search.xs
> d
> 
>                        <xs:attribute name="operator"> 
> 81                                 <xs:simpleType> 
> 82                                         <xs:restriction
> base="xs:string"> 
> 83                                                 <xs:enumeration
> value="AND"/> 
> 84                                                 <xs:enumeration
> value="OR"/> 
> 85                                         </xs:restriction> 
> 86                                 </xs:simpleType> 
> 87                         </xs:attribute> 
> 
> Regards,
> 
> 
> Andre
> 
> 
> 
> 
> -----Oorspronkelijk bericht-----
> Van: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Namens Stefano
> Gambini
> Verzonden: donderdag 20 maart 2008 12:06
> Aan: [email protected]
> Onderwerp: [pmapper-users] multiple search
> 
> is there a way to implement a multiple search based on different
> attributes of a single layer? in search.xml i write:
> 
>     <searchitem name="geologia" description="Geologia">
>         <layer type="shape" name="geologia">
>             <field type="s" name="FORMAZIONE" description="Formazione"
> wildcard="0" />
>         </layer>
>         <layer type="shape" name="geologia">
> 
>             <field type="s" name="ETA" description="Eta"  wildcard="0"
> />
> 
>         </layer>
>     </searchitem>
> 
> As a result i do get "Formazione" and "Eta" in the search combo box for
> "Geologia" but when i select an attribute for Formazione and one for Eta
> and run the search i get "no records found".
> Is there a way to implement a simultaneous search based on different
> attributes of a single layer?
> 
> Regards,
> Stefano
> 
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> ------------------------------------------------------------------------
> -
> This SF.net email is sponsored by: Microsoft Defy all challenges.
> Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> pmapper-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> pmapper-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pmapper-users

_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
pmapper-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to