This topic is locked
[SOLVED]

 Totals in list page filter box when adding a where clause

6/7/2016 1:57:51 PM
ASPRunner.NET General questions
Pete K author

I love it that you can show totals next to filter items in the filter box (by selecting an option under "Show Totals" on the "Filter as" tab.) However, I have added some code on the list page to restrict the displayed rows to only those meeting a certain criteria (the user's work location) and I was hoping that the filter totals would be calculated based upon the modified query, but they are not. I added the where clause in the "Before SQL Query" event as suggested in the help file.
So I guess my question is -- is there a way to make this work? Or is this a feature that could be added in a future version?

T
Tim 6/7/2016

Hi Pete,
I ran into this same issue. I was able to overcome it by using the "After table initialized" event instead. You can add the following code:
query.addWhere("something = anotherthing");
This will apply to all pages, but in effect it really only alters the list page because it doesn't really make sense for the other pages.
Hope this helps.

Tim

Pete K author 6/7/2016

Perfect! Thanks for the help, Tim.

jadachDevClub member 6/7/2016

This is awesome. I never used filter as before. I will now.