Topic: Configure clear button

I want the sum of values in the footer when using the Search button, but not when the search is cleared after clicking the Clear button. However, the calculation is occurring even when the search is cleared, giving a wrong value, as the currency is different. How to overcome this issue?

Post's attachments

Attachment icon currency.7z 236.82 kb, 224 downloads since 2020-06-21 

2 (edited by derek 2020-06-21 11:28:41)

Re: Configure clear button

Morning Eyeman,
In your project, an easy way would be to copy your 'search' button, rename it 'clear' and then in the tablegrid layout for the 'clear' button, simply remove the footer 'sum' instruction (remember that each search button has its own discrete layout and the 'clear' button is simply another search!).
Obviously, you'll still need your existing bit of script to clear all your search fields.
Please have a look at the attached.  In this example, when I do a 'search' I change the layout to be 'Country, Name' with a footer count.  When I do a 'clear' I change the layout to be 'Name, Country' with no footer count.
Hope this helps,
Derek.

Post's attachments

Attachment icon search grids.zip 337.23 kb, 239 downloads since 2020-06-21 

Re: Configure clear button

Good afternoon Derek,
I now understand that the 'clear' button is simply another search. I have followed your example and made the necessary changes. The 'clear' button is now giving the desired search result. I'm so happy! Thank you so much for teaching me a new lesson.
Regards,
Eyeman

Post's attachments

Attachment icon new_clear_button.JPG 90.33 kb, 120 downloads since 2020-06-21