Open rmarzocchi84 opened 3 years ago
I did not try but it seems like an enhancement :) Maybe someone achieved this behavior so I let 'question' label.
@nboisteault from my test it seems a security problem https://docs.qgis.org/3.16/en/docs/server_manual/services.html#filter
When I add a filter
filter=v_grafo_incongruenze:UT:id+IN(+12+) filter=v_grafo_incongruenze%3A%22UT%3A%22id%22%2BIN%2B%28%2B12%2B%29
this i sthe error:
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
<ServiceException code="Security">The filter string "id"+IN+(+12+) has been rejected because of security reasons. Note: Text strings have to be enclosed in single or double quotes. A space between each word / special character is mandatory. Allowed Keywords and special characters are IS,NOT,NULL,AND,OR,IN,=,<,>=,>,>=,!=,',',(,),DMETAPHONE,SOUNDEX. Not allowed are semicolons in the filter expression.</ServiceException>
</ServiceExceptionReport>
Did you respect A space between each word / special character is mandatory
?
Did you respect
A space between each word / special character is mandatory
?
Adding spaces filter=v_grafo_incongruenze+:+UT:id+IN(+12+)+
the request works, but not the filter
Sorry filter=v_grafo_incongruenze:+"id"+IN(+12+)+ it works!
where:
filter=layername:+"field_name"+OPERATOR+'string variable'+
or filter=layername:+"field_name"+OPERATOR+number+
The permalink from filter can be a nice enhancement but just now user can create a script to have the correct URL request
I've tried to implement this nice feature, but I don't get it to work. See also my post on gis.stackexchange.com. Features are not filtered on the map, but only in the data menu.
The url we are using is: https://ourserver.com/lizmap/index.php/view/map/?repository=xfn&project=xfn_lizmap&filter=v_parcels%3A%22id%22%20IN%20(%2054%20,%2055%20,%2056%20,%2053%20,%2052%20,%20516%20), so that the filter part looks like &filter=v_parcels:"id" IN ( 54 , 55 , 56 , 53 , 52 , 516 )
v_parcels
is the original layer name from PostGIS, not the alias given in the Lizmap plugin. For the layer both are configured in the Lizmap plugin in QGIS, the form filter and the attribute table with id as primary key field. The Lizmap version is 3.4.7.
Are there any other prerequisites that I miss to get it to work?
Meanwhile I'm working with Lizmap version 3.5.3.
But still I'm unable to get this filtering by URL to work.
&filter=gebiete:"gid" IN ( 11 , 12 )
The PostGIS layer 'gebiete' has identifier 'gid' and the features 11 and 12 exist in the database.
In QGIS the layer is published as WFS
and in Lizmap-Plugin the layer is set up in the attribute table and the form filter.
I do not find this 'filtering by url' in the documentation.
When I look at the lizmap log-file I get the following error:
error 2022-05-09 15:22:00 [0] syntax error, unexpected ')' /var/www/lizmap-web-client-3.5.3/lizmap/modules/filter/controllers/service.classic.php 89
Any idea how to get this to work or where to find documentation about this topic?
Is this covered by #3074 @nboisteault and others ?
@geomoes @rmarzocchi84 Could you test https://github.com/3liz/lizmap-web-client/pull/3074 and give us feedback please?
~So it's included in latest 3.6 releases~
This issue is missing some feedbacks. 👻 Please have a look to the discussion, thanks. 🦎
This issue is missing some feedbacks. 👻 Please have a look to the discussion, thanks. 🦎
Hi, it took me a time to wait until the final release of the 3.6.0 version of Lizmap. Then I had issues to get the required qgis-server-plugin up and running. Now I want to test the new possibility to filter by passing filter conditions via URL. I'm trying the following syntax as noted already above: &filter=gebiete:"gid" IN ( 11 , 12 ) &filter=gebiete:"gid"=12 but I don't get it to work.
Could You please provide the right syntax that is needed?
II try to add a permalink filtering a layer, but the function it is not supported using filter and permalink.
I try adding the filter properties in the WMS request
but it seems to do not work (the layer disappear from map!!)
Any idea? It can be a nice option for users..