Hello,
We have a build a canvas app, which loads data from Business Central through a virtual table (in Dataverse). We use this code in a gallery:
Refresh('Virtualtable');;
Sort(Sort(ClearCollect(
Department;
If (
Afd = "100";
Filter(
'Virtualtable';
No = "100";
HB < 510;
BewAppStatus = "Open" || BewAppStatus = "Skipped"
);
If (
Afd = "200";
Filter(
'Virtualtable';
No = "200";
HB = 200;
BewAppStatus = "Open"
);
If (
Afd = "210";
Filter(
'Virtualtable';
No = "210";
HB = 210;
BewAppStatus = "Open"
);
If (
Afd = "300";
Filter(
'Virtualtable';
No = "300";
HB = 300;
BewAppStatus = "Open"
);
If (
Afd = "310";
Filter(
'Virtualtable';
No = "310";
HB = 310;
BewAppStatus = "Open"
)))))
In the gallery we have filters on the data; see the example above. The number of records that pass the filter are normally below 20, so in the gallery there are sometime 13, 5, 2, 18 records to see, depending on the value of the variable 'Afd'. But loading the gallery takes on a device (tablet) 5-20 seconds. The number of records in the totalset is around 1700. Scrolling can take up to 8 seconds to refresh. What can be the problem here? How can we improve this? All ideas are welcome!!!
Thank you in advance!