Table Named Query

I have a table, linked to a named query. Named query caching is off, table polling is set to 5 seconds.

When I add / edit the table on a client. The other clients do not update unless you navigate to another page and back again. I’m guessing its because every time you open the page it calls the query to update.

If we have monitors / TV’s displaying data, their page will never change. How will we get table to update? Will i need some timer code somewhere to force the table to update ?

Consider using sendMessage() in the client that performs the update (after the results come back) to notify interested clients to use system.db.refresh() on the affected bindings.

1 Like

I was not able to replicate the issue you are seeing, with polling enabled the table should update every 5 seconds with any changes to the data the query would pick up. Are you using Vision or Perspective here? and how is your polling configured?

Sorry I should have said Im using perspective, Nightly build from yesterday in windows environment but neither the chrome browser, android or IOS apps update either.

Polling is set to 5 seconds on the screen for binding the data, Everything is turned off except polling and enabled. Return is set to auto and its returning a data set.

If i edit or add more lines in the database (directly into the database) the table does not update unless I navigate away and back to the table.

I am still not able to replicate it. I moved to the latest nightly and tried a few settings but it always updates appropriately. Would you mind right-clicking the table and hitting Copy, then pasting it into notepad and sending that over to me?

[
  {
    "type": "ia.container.coord",
    "version": 0,
    "props": {
      "mode": "percent",
      "style": {
        "backgroundColor": "#FFFFFF",
        "border-left": "15px solid #AAA",
        "borderRadius": "10px",
        "borderStyle": "solid",
        "borderWidth": "2px"
      }
    },
    "meta": {
      "name": "Table Container"
    },
    "position": {
      "breakpoints": [
        {
          "colIndex": 0,
          "name": "sm",
          "order": 0.5,
          "rowIndex": 1,
          "span": 12
        },
        {
          "colIndex": 5,
          "name": "md",
          "order": 3,
          "rowIndex": 0,
          "span": 7
        },
        {
          "colIndex": 4,
          "name": "lg",
          "order": 3,
          "rowIndex": 0,
          "span": 8
        }
      ],
      "height": 410
    },
    "custom": {},
    "children": [
      {
        "type": "ia.display.table",
        "version": 0,
        "props": {
          "virtualized": false,
          "selection": {
            "selectedColumn": "Manufacturer",
            "selectedRow": 0
          },
          "rows": {
            "style": {
              "borderStyle": "solid",
              "borderWidth": "1px",
              "color": "#555555",
              "textAlign": "center"
            }
          },
          "cells": {
            "style": {
              "textAlign": "center"
            }
          },
          "pager": {
            "bottom": false
          },
          "style": {
            "fontSize": "12px",
            "textAlign": "center"
          }
        },
        "meta": {
          "name": "Table"
        },
        "position": {
          "height": 0.9125,
          "width": 0.9443,
          "x": 0.0289,
          "y": 0.0465
        },
        "custom": {},
        "propConfig": {
          "props.data": {
            "binding": {
              "config": {
                "designerUseLimit": false,
                "polling": {
                  "enabled": true,
                  "rate": "5"
                },
                "queryPath": "Assets/Select Assets"
              },
              "type": "query"
            }
          }
        }
      }
    ],
    "propConfig": {
      "props.style.borderColor": {
        "binding": {
          "config": {
            "mode": "direct",
            "tagPath": "[default]Colours/Orange"
          },
          "type": "tag"
        }
      }
    }
  }
]

I’ve done some more testing.

It seems like after I apply the binding to the table and OK it, it will poll correctly after i add a new line to the table, but when I add another line to the table it wont poll again.

Almost as if the polling time isn’t restarting, It also seems like if I dont add a new line with in the initial polled time it wont poll at all, until I reapply the binding to the table.

Well nothing appears to be wrong with your table or the container it is in. The polling appears to be working for me. Are you by chance getting any errors in the designer or gateway that could be affecting the query?

I’ve looked and no errors.

I did a fresh install on the server with todays nightly, uploaded the project and same problem.

It will poll once and not again. I opened client in 2 different machines, the server and a tablet and none will update. I’ve tried every setting but just cant get it to keep polling. Until I navigate away and back.

The data is entered via a pop up, then saved with a button which does a ‘system.db.runPrepUpdate’
The data is going direct into the table as I can see it in the database instantly but the tables in the client just wont pick it up.

Somewhat random suggestion, but if you enable the Bypass Cache setting on the binding, do you see the newer results when the binding polls?

No difference. I have my query DB browser open set to auto refresh, I can see the db table entry appear but table wont poll. I have polling set to 10 seconds. If I don’t add a entry with in 10 seconds it wont poll at all, If I add a entry before 10 seconds it will poll once and not again.

If you want I can create a log in, send it Via PM and you can take a look, Its not a live production server, just testing.

At this point, getting in contact with support would probably be best - there’s a lot of variables, so having full access including to your designer/DB to verify things would be best.

I’ve entered a support ticket but I’ve also found a way around for the time being.

I created a query tag, put the query in there to create a dataset on a fixed rate then use that for the data prop in the table.
The table now polls correctly (if you can call that way correct)

I’m facing the same issue. I created a perspective table with named query to fetch the data, if I activate polling then all my configured events and button actions in this session are delayed between 30 to 60 secs right from session startup.
If I deactivate polling, all the events and button actions working normal, but the table doesn’t get updated with real time update.
I tries suggested solution of creating a query tag with fixed rate, yet the problem is same, all my configured events and button actions in this session are delayed between 30 to 60 secs right from session startup.
And this delay happens only on tablet perspective users. Not for computer users.
@craigb Was there any solution identified for this from the support ticket?

If i remember correctly when i updated my version that seem to fixed the issue. I also changed the way I done things and cut down on polling dramatically.

If your table is only updating when you are adding or editing fields then you can turn off polling and use something like the following on your button…

self.parent.parent.getChild("Table Container").getChild("Table").refreshBinding("props.data")

This will refresh the table every time you press the button which could be a edit or add button etc. Anytime the view is opened with a named query it updates regardless of polling.

For the fixed rate query tag, attached is how i had it set up and working for 1 second polling.

1 Like

Thanks for the prompt reply. Actually I'm running on 8.0.6 STABLE, still the problem persists.
Yes I did create a query tag with fixed rate exactly as the picture you attached, but the delay continues to exist.

At present I do the same as you suggested with refresh on button press, but the table will be updated by other clients as well, hence we need to keep the table updated real time. I badly need this option to work.

I’ll do some digging around tomorrow and see if can replicate the error I had.

Do you have the cache options enabled?

I hope you mean “bypass cache”.
I did try both, with and without bypass cache. Still same issue.