HI All,
We are hoping someone has some tips for us. We have developed a Projects Gallery that references our SQL database.
We have label that references the projects gallery and sums the items based on filters.
It works except it only sums what is immediately present in the gallery box onscreen. We need to scroll to the bottom of the galley for the sum to be correct. It is filtering Correctly.
The code we have used in the label.
Text(Round(Sum(ProjectsGallery_2.AllItems,'FY Budget'),0),"[$-en-US]$0#,###")
Does anyone know what code to add so the sum occurs without the requirement for scroll down in the gallery to load all the data?
Thanks
Hi @dataanalytics ,
I am suspecting that your query does the normal thing and bring back 100 items at a time. If your filter brings back less than 2,000 items, you can sum the same filter as the gallery, but beyond that Sum() is not delegable directly on a dataset.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
The AllItems property of gallery controls only holds the visible content at first, so it's not a good practise to reuse it to sum it's contents.
Your best option is to replace ProjectsGallery_2.AllItems with the code from the Items property of ProjectsGallery_2, which probably references a datasource or collection.