12-24-2018 12:09 AM
I have created a parameterized query using GeoMedia Desktop for WMPS service. The parametrized query works fine and great. The query is listed below:
Name of the Query: PLANTATIONSTOCK
Query String: select * from JALPAIGURI_STOCK_MAP where RANGE like '!range!' and BEAT like '!beat!' and YEAR_OF_PL like '!Year!' and TYPE_OF_BL like '!BLTYPE!'
auto fill query string for !range!: select distinct RANGE from JALPAIGURI_STOCK_MAP
auto fill query string for !beat!: select distinct BEAT from JALPAIGURI_STOCK_MAP
auto fill query string for !Year!: select distinct YEAR_OF_PL from JALPAIGURI_STOCK_MAP
auto fill query string for !BLTYPE!: select distinct TYPE_OF_BL from JALPAIGURI_STOCK_MAP
The query works fine in the geospatial portal. However, I have a query to make, if I introduce a where clause in the autofill query string to filter the values, no values appear when using the search button in geospatial portal for that parameter. eg:
If I change the autofill query for !beat!: select distinct BEAT from JALPAIGURI_STOCK_MAP where RANGE like '!range!'
it returns with no values while using it in geospatial portal. Any suggestions, would be helpful.
12-27-2018 01:24 AM
I'd say it's because the auto-fill queries are not dynamic - i.e. when you change the !range! value, it's not propagated into the !beat! query. This likely leads to following SQL statement: select distinct BEAT from JALPAIGURI_STOCK_MAP where RANGE like null
12-31-2018 09:34 PM
Thanks for posting. Yes you have correctly stated, I checked the same. I used a specific attribute value in the autofill column and once in the geoportal, it reflected the only values for it.
However, if I wish to make it dynamic, is there any option or any workaround. This will be a useful thing to have through COTS, rather than going in for customisation.