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
Contributor
Posts: 21
Registered: ‎05-31-2016
Accepted Solution

How to put in pre-defined order the queries made for the websig

Hello,
I have created a series of pre-defined geomedia searches for availability in the webmap, but after publication they always appear unordered.
There is some trick to solve this issue that does not go through editing the xxx_capabilities.xml file?

 

OrderedQueries.PNG

OrderedQueries2.PNG

 

Thanks,

Rui

Technical Evangelist
Posts: 1,101
Registered: ‎09-11-2015

Re: How to put in pre-defined order the queries made for the websig

[ Edited ]

Hi Rui,

 

This looks like a bug because it should be possible to change the Queries order by the ordering buttons. It looks like the Priority column values are not picked up by WMPS service. The priority should be reflected in the Capabilities XML document.

So as a workaround you can change the order of Queries there. Unfortunately you must arrange the XML nodes <a:anyType i:type="Query"> which can be a bit of work for the amount of queries you currently have.

 

EDIT: I've found that this is a known problem.

 

Regards,

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Super Contributor
Posts: 372
Registered: ‎10-12-2015

Re: How to put in pre-defined order the queries made for the websig

Another workaround is to manually modify the WPQUERIES and WPQUERYPARS in the WMPS config database. From memory

  • queries are ordered by WPQUERIES.ID (instead of PRIORITY)
  • if change WPQUERIES.ID you need to update corresponding WPQUERYPARS.QUERY
Contributor
Posts: 21
Registered: ‎05-31-2016

Re: How to put in pre-defined order the queries made for the websig

Hello Shaun,
I have already put in order with association between the WPQueryPars.Queries vs WPQueries.ID according to the image, that the red is the association of the ID's, the purple ordering of WPQueriesPars and even the orange, I put different ParNames to avoid errors in the queries when we have two or more queries with the same name in ParFiles and WebMap does not clear the cache returning the same lists in different queries.ByOrderExample.png

 

Regards,

Rui

Highlighted
Technical Evangelist
Posts: 1,101
Registered: ‎09-11-2015

Re: How to put in pre-defined order the queries made for the websig

[ Edited ]

I was thinking about changing the IDs directly in DB too but I was bit afraid of possible corruptions. There's also table WPMapsQueries that references the Query IDs but this one should not be a problem as it's rather an obsolete WebPublisher object - Queries are now available everywhere, no matter which map is displayed.

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Super Contributor
Posts: 372
Registered: ‎10-12-2015

Re: How to put in pre-defined order the queries made for the websig

Its been a few years since I last tried it - what you have done seems right.

Clear the WMPS capabilities cache and all going well should have the right order.

Super Contributor
Posts: 372
Registered: ‎10-12-2015

Re: How to put in pre-defined order the queries made for the websig

Finally dug this out from last time I did the reorder (ver 2014), for .mdb based WMPS config db.

"

There are dependent tables on the ID column so need to be careful when using SQL to reorder the table by ID column. Technically directly modifying the WMPS source tables probably breaks support, but this seems to work in the interium.

e.g. for .mdb WMPS meta-database can use following update queries to change the order based on Priority.
(requires administrator to have knowoledge of udpate queries)
 1) Temporarily Disable  Relationships
  a. Tools> Relationships
  b. Disable relationship between WPQueries and WPQueryPars
  d. Disable relationship between WPQueries and WPMapsQueries (In 2014 this table is typically left empty as it does nothing, if empty do not need to disable)
 2) Update 1 Run following Query: UPDATE WPQueries INNER JOIN WPQueryPars ON WPQueries.ID = WPQueryPars.Query SET WPQueryPars.Query = [WPQueries].[Priority];  
 3) Update 2 Run following Query: UPDATE WPQueries INNER JOIN WPMapsQueries ON WPQueries.ID = WPMapsQueries.Query SET WPMapsQueries.Query = [WPQueries].[Priority];   Note: Most of the time in 2014 WPMapsQueries won't be populated in which case above query can be skipped.
 4) Update query 3 Run following Query: UPDATE WPQueries SET WPQueries.ID = [WPQueries].[ID] * 1000;  
 5) Update query 4 Run following Query: UPDATE WPQueries SET WPQueries.ID = [WPQueries].[Priority];  
 6) Re-Enable relationships. Recheck the checkboxes that were disabled in first step.
  
 7) Tools> Compact And Repair Database (Not required)

"

Contributor
Posts: 21
Registered: ‎05-31-2016

Re: How to put in pre-defined order the queries made for the websig

Hello Shaun,
I appreciate the tip, and I can say that it worked perfectly.

 

Regards,
Rui

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