06-07-2017 04:30 AM
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?
Solved! Go to Solution.
06-07-2017 05:14 AM - edited 06-07-2017 05:24 AM
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.
06-07-2017 09:39 PM
Another workaround is to manually modify the WPQUERIES and WPQUERYPARS in the WMPS config database. From memory
06-08-2017 03:38 AM
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.
06-08-2017 06:35 AM - edited 06-09-2017 12:09 AM
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.
06-08-2017 07:40 PM
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.
06-08-2017 07:45 PM
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 1Run following Query:UPDATE WPQueries INNER JOIN WPQueryPars ON WPQueries.ID = WPQueryPars.Query SET WPQueryPars.Query = [WPQueries].[Priority];
3) Update 2Run 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 3Run following Query:UPDATE WPQueries SET WPQueries.ID = [WPQueries].[ID] * 1000;
5) Update query 4Run 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)