Refresh ReadOnly Grid

Certified Senior Developer

Hi all,

I am facing an issue related to data being refreshed in read-only grid.

The issue is in my read-only grid, I have navigated to a different page say 21-30. But after certain interval i.e., 30 sec my grid page navigates back to 1-10 automatically. I have a configuration of refresh Interval of 30 sec in the read-only grid. Does the grid refresh configuration update only the grid data or it also impacts the current fv!pagingInfo of the grid?

Reason to add refreshInterval was to update the grid data for user as soon as a new work item is created.

BTW the data field is a recordtype which allows me to use certain other features of grid.

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer

    I believe (but haven't tested) that this internal refresh behavior is intentional and, to some extent, required.  Say you're viewing (and auto-refreshing) a highly variable data set (which Appian has to assume is possible, as it has no way of knowing either way), where at any given minute, the grid could have 3 pages or it could have 10 pages.  If you've navigated to page 8 of the data, and the auto refresh occurs, and now there are fewer than 8 pages' worth of data - if your paging info still has you viewing page 8, the grid will throw an unfriendly-looking error.  Instead, Appian presumably ensures that all auto-refreshes will be "sanitized" for this behavior by resetting the (internal) Start Index back to 1 for each refresh.

    You can probably work around this by querying your data externally (and storing your paging info externally as well), and refreshing your data that way.  You'd just need to make sure to check that the data size after any given refresh is compatible with the old Start Index (i.e. the data is long enough that the start index will still make sense, lest it throw an error), and otherwise, reset the start index (which i think is doable, as long as you're reasonably versed in writing this code manually).

Reply
  • +1
    Certified Lead Developer

    I believe (but haven't tested) that this internal refresh behavior is intentional and, to some extent, required.  Say you're viewing (and auto-refreshing) a highly variable data set (which Appian has to assume is possible, as it has no way of knowing either way), where at any given minute, the grid could have 3 pages or it could have 10 pages.  If you've navigated to page 8 of the data, and the auto refresh occurs, and now there are fewer than 8 pages' worth of data - if your paging info still has you viewing page 8, the grid will throw an unfriendly-looking error.  Instead, Appian presumably ensures that all auto-refreshes will be "sanitized" for this behavior by resetting the (internal) Start Index back to 1 for each refresh.

    You can probably work around this by querying your data externally (and storing your paging info externally as well), and refreshing your data that way.  You'd just need to make sure to check that the data size after any given refresh is compatible with the old Start Index (i.e. the data is long enough that the start index will still make sense, lest it throw an error), and otherwise, reset the start index (which i think is doable, as long as you're reasonably versed in writing this code manually).

Children