So you're seeing a different substitution result when using %key% in: FILTER '...%key%...'
versus: PROCESSING 'NATIVE_FILTER=...%key%' If so that would be a bug. The value that replaces %key% should be consistent. The value you supply could be different though because how the expression is being further processed (e.g. MapServer vs. layer-specific driver) is different. I'll have to whip up a quick test case to verify. Otherwise I think in general you'd want to avoid lists if possible and send things individually so key1=value1&key2=value2... and then use something like: PROCESSING 'NATIVE_FILTER=...column in ('%key1%','%key2'%) I would think validation would be easier in this case but I understand it might not be practical with an indeterminate number of options. In that case its probably best to send a completely encoded set of values (complete with quotes) depending on the diver, so... key=%27value1%27%2C%27value2%27%2C%27value3%27 and then use: PROCESSING 'NATIVE_FILTER=...column in ('%key%) I can't think of an alternative short of 1) adding the ability to split and format strings before substitution (set a delimiter and a printf pattern) or 2) adding a function like Perl's qw (quote word) that would handle string delimiters for you qw(value1,value2). The latter would only work for FILTERs, --Steve On Thu, Oct 31, 2019 at 3:31 AM Jörg Thomsen (WhereGroup) < joerg.thom...@wheregroup.com> wrote: > Good morning everyone, > > we built an application which uses a runtime substitution for the filter > string. And we found a different behavior between (the old) Filter and > the native_processing filter if two values are parsed. > > the request http://....?..&key=vaule1,value2 > results to > 'value1','value2' with the old FILTER () and to > 'value1,value2'when using PROCESSING 'NATIVE_FILTER > > We have to use the PROCESSING 'NATIVE_FILTER, but need as result > 'value1','value2', because we want to use it in a sql-query like: > value in ('value1','value2'). > > First question: > has anyone an idea how to handle this? We could request > http://....?..&key=value1','value2 > but that's no nice solution. > > Second question: is it the wanted behavior or perhaps a bug? > > Jörg > > -- > > *************************** > Where2B Konferenz 2019 > 12. Dezember 2019 in Bonn > where2b-conference.com > *************************** > > Jörg Thomsen > WhereGroup GmbH > Gillweg 3 > 14193 Berlin > Germany > > Fon: +49 (0)30 / 5130 278 74 > Fax: +49 (0)30 / 5130 278 11 > > joerg.thom...@wheregroup.com > www.wheregroup.com > > Geschäftsführer: > Olaf Knopp, Peter Stamm > Amtsgericht Bonn, HRB 9885 > > ------------------------------- > Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com > _______________________________________________ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users