Hi, With your data and this search definition it worked yesterday:
<searchitem name="goeland_adresses" description="Adresses -Suggest Suggest PGSQL-"> <layer type="postgis" name="goeland_addresse_lausanne"> <field type="s" name="lastname" description="Rue" wildcard="2"> <definition type="suggest" connectiontype="db" minlength="1" startleft="1" sort="asc" nosubmit="1"> <dsn encoding="UTF-8">@</dsn> <sql>SELECT DISTINCT lastname FROM test.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY lastname</sql> <!--<events>onchange="$('#pmsfld_numero').val('').flushCache()"</events>--> </definition> </field> <field type="n" name="numero" description="No" wildcard="2"> <definition type="suggest" connectiontype="db" sort="asc" minlength="0" dependfld="lastname"> <dsn encoding="UTF-8">@</dsn> <sql>SELECT DISTINCT numero FROM test.goeland_addresse_lausanne WHERE numero::text ~* '^[search]' and lastname = '[dependfldval]' ORDER BY numero</sql> </definition> </field> </layer> </searchitem> Take a look on the dsn that don't need to be re-specified. But it requires 1 character or more. The table is in the "test" schema here. Le 03/04/2013 10:06, Chris forum a écrit : > Hi Thomas, > > Thx a lot for the explanation, I have chosen to use the nosubmit="1" > parameter. > > First field works now, the query is not launched anymore when a > suggested street name is clicked: > <definition type="suggest" connectiontype="db" minlength="1" > startleft="1" sort="asc" *nosubmit="1"*> > > > So I am a step further, there is still a problem though with the > second field: it doesn't suggest anything: > <definition type="suggest" connectiontype="db" sort="asc" > minlength="1" dependfld="lastname"> > > Did you manage to test my data? Does it work on your system? > Here, if I choose the street name "Abeilles" and then type "2" in the > second field, nothing is proposed while the numbers "23" , "25", "27" > and "29" are in the db (the one I sent you). > > Sorry to insist... > > Chris > > > > > On Tue, Apr 2, 2013 at 6:05 PM, Thomas RAFFIN <traf...@sirap.fr > <mailto:traf...@sirap.fr>> wrote: > > OK, it is due to bad configuration. > > You could do one of those: > - Unactivate auto submit for suggested fields ==> set > "PM.suggestLaunchSearch = false;" in js_config.php (applies to all > suggested fields!) > - keep "PM.suggestLaunchSearch = true;" and add to each definition > where it is needed the "nosubmit" parameter to "1" like this for > instance: > <definition type="suggest" connectiontype="db" minlength="1" > startleft="1" sort="asc" nosubmit="1"> > > Bye > > Thomas > > Le 02/04/2013 15:43, Chris forum a écrit : > > Hi Thomas, > > Please find attached the necessary files to reproduce my > environment. > > Thanx a lot! > Chris > > > > ------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html _______________________________________________ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users