Announcements
Hi,
I am creating a PCF control that can be used to visualize a list of activities. It's important this control visualizes quickly, so as an optimization I want to add a filter on the dataset which only retrieves recent records. When this dataset is loaded and the user can click, I remove the filter and all records are loaded in the background, allowing the user to start working (assuming the already loaded records are what the user wants to view).
Basically, the control works as follows:
- init, setFilter with date > 14 ago and date < next 14 days,
- updateView, first page of results, updates the visible data
- updateView, next page (if applicable)
...
- In the last updateView when all pages are loaded, the filter is removed, and the dataset is refreshed using context.parameters.dataSet.refresh().
- updateView, first page of results, updates all data (since no filtering is applied).
- updateView, next page (if applicable)
... etc.
This works like a charm if the initial result has multiple pages.
However, when I try to refresh a dataset which has only one page, the new filter (which should return all records) is never applied and exactly the same records are returned after the refresh().
Am I doing something wrong? I tried clearing the filter before setting it, resetting the paging, changing the page size, but nothing seems to trigger an update for the record set if the initial one is only one page.
Kind regards,
Maarten van Sambeek
Bringing this post back from the dead. I am also getting this issue as well. I am doing some advanced filtering and sorting on my fetchxml for the dataset view. When it first loads the data on my pcf the filter works like a charm. But if I hit refresh then the filter removes itself, until I reload the whole page again.
Anyone else have a solution to this?
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156