Hexagon Geospatial
MENU

WebGIS

Need a push in the right direction when configuring WebMap, Portal or SDI services? Looking for hints and tips, or just looking for Ideas and information? The WebGIS discussion board is where you start those discussions, connect and share information.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Occasional Contributor
Posts: 12
Registered: ‎10-18-2017

Parameterized Queries in GeoMedia WebMap

Hi Everyone,

 

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.

 

Regards!

 

Aroop CHakraborty

Technical Evangelist
Posts: 985
Registered: ‎09-11-2015

Re: Parameterized Queries in GeoMedia WebMap

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

 

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Occasional Contributor
Posts: 12
Registered: ‎10-18-2017

Re: Parameterized Queries in GeoMedia WebMap

Hi Jan,

 

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.

 

@jan.neumann

 

Regards!

Aroop

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.