MapInfo Pro

 View Only
  • 1.  Refresh of the new Layer Filter option

    Posted 15 days ago
    I had a look at the new Layer Filter option that is now in V2021.1 when it came out.
    Now we have noticed that the Filter does not get refreshed if you edit your data or add new records.
    If you add a Query to your Map Window as a new Layer (same result as a Filter), then you can refresh your Query from the Explorer panel
    Or am I missing something?

    ------------------------------
    John Ievers
    CDR Group
    Hope Valley, United Kingdom
    ------------------------------


  • 2.  RE: Refresh of the new Layer Filter option

    Employee
    Posted 12 days ago
    That doesn't sound right, John.
    Please raise this with our support team at support@precisely.com

    Thanks

    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------



  • 3.  RE: Refresh of the new Layer Filter option

    Employee
    Posted 10 days ago

    Hi John,

    The docs could be clearer.

    From the help:

    Note: When Filter is applied on a layer an internal hidden table is created.

    You can use the LayerInfo(<mapId>, <layerNum>, LAYER_INFO_FILTER_TABLE_ALIAS) to get the alias of the hidden filter query table.

    Then the syntax to refresh the table is:

    select Update For table_name Refresh [All]

    table_name: is the name of an existing query table. Query table should not be having any group by clause, aggregators (spatial, non-spatial), or derived objects and should have a where clause.

    Refresh : Optional Token to refresh the query table map, browser, and theme. Specifying only the Refresh token will not recalculate the theme bins. To recalculate the theme bins, specify the Refresh All token. The Refresh token if used without a where clause will re-evaluate the queries' existing where condition, without closing the table and its dependent windows. This is useful in case the table data changes and the query needs to be re-evaluated.

    Hope this helps.



    ------------------------------
    Bob Fortin
    Software Architect and Distinguished Engineer
    MapInfo Pro Development Team
    ------------------------------



  • 4.  RE: Refresh of the new Layer Filter option

    Posted 10 days ago
    Bob
    Are you saying that this is by design?
    Not much help to users...

    ------------------------------
    John Ievers
    CDR Group
    Hope Valley, United Kingdom
    ------------------------------



  • 5.  RE: Refresh of the new Layer Filter option

    Employee
    Posted 10 days ago
    Hi John,

    I was just explaining it but I missed your point. It works as designed but maybe is missing something.
    Since the query table is hidden from end users they cannot easily refresh it from the ui.

    How is the data getting edited? Manually or other wise?

    Maybe we can be smarter about when the base table changes to refresh the query on filtered layers.
    Or we can add a way to refresh it or consider making it not hidden.

    ------------------------------
    Bob Fortin
    Software Architect and Distinguished Engineer
    MapInfo Pro Development Team
    ------------------------------



  • 6.  RE: Refresh of the new Layer Filter option

    Employee
    Posted 10 days ago
    More info - I am not sure why toggling the layer filter on and off does not refresh the query table. There may be a reason.

    ------------------------------
    Bob Fortin
    Software Architect and Distinguished Engineer
    MapInfo Pro Development Team
    ------------------------------



  • 7.  RE: Refresh of the new Layer Filter option

    Posted 10 days ago
    Hi Bob,

    The lack of the filter being refreshed is the crux of the issue. From a users perspective, anything that is set in the layer properties dialog is usually instantly reflected on the layer, so it would be reasonable to expect the filter to work in the same way.

    The only hint it behaves differently is that the filter has to be switched off before a layer can be made editable, which is how we then noticed it was removing the new additions when switching it back on.

    Hoping it can be made to work as expected as it's an elegant solution to a challenge a team of users was experiencing.

    Thanks

    Darren

    ------------------------------
    Darren White
    Derbyshire County Council
    MATLOCK
    ------------------------------



  • 8.  RE: Refresh of the new Layer Filter option

    Posted 10 days ago
    Bob
    Is there an analogy here with Thematic Maps?
    A type of filter on a Layer and the Thematic Layer is dynamically updated as data changes.

    ------------------------------
    John Ievers
    CDR Group
    Hope Valley, United Kingdom
    ------------------------------



  • 9.  RE: Refresh of the new Layer Filter option

    Posted 10 days ago
    Hi,

    have to admit upon reading this I was surprised to find that the filter didn't just automictically update the map, like John and Darren were.  I had just assumed it would have.

    Interestingly if you save a workspace and the data changes the filter does update when you re-open it.

    Could a 'refresh filter' button option on the filter tab on the layer properties dialogue box be a potential solution? Or added to the menu when you right click over the layer in layer control?

    Nick





    ------------------------------
    Nick Hall
    Mapchester LTD
    Manchester
    ------------------------------



  • 10.  RE: Refresh of the new Layer Filter option

    Employee
    Posted 2 days ago
      |   view attached
    I have taken Bob's advice and converted it into a small tool that adds a Refresh Filtered Layer option to the context menu of the layers in the Layer List.

    In this way, it will be easy to force a refresh.

    The attached file contains the compiled MapBasic application and the source code.

    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------

    Attachment(s)

    zip
    RefreshFilteredLayer.zip   2 KB 1 version