Please refer to the Admin Board, I have created three card on top which shows no. of record with different status of the job phases (by filter ).
Also, I have created several tabs for job phases based on the "Year", What I want is how can I make the count change in the card based on the year I click in the tab.
E.g. When I click 2026, the number in Pending only show the count in 2026, when I click 2025, the count will be shown for 2025 data only.
Kindly advise.
count
Hi,
Basically you need to use onTabChange event. So whenever tab get changed this event will trigger.
In OnTabChange event you should get value of year and then refresh aggregate according to that. Right now you have four aggregates for 4 years. Instead you should have single aggregate there. Because its not good approach lets say in future if you have 10 years then you need to create 10 aggregates. So create only single aggregate and apply filter of year and other filters in that.
Now in onTabChange event you get the value of year and store it in a local variable. This local variable will be use as year filter in your aggregate so after that you just need to refresh the aggregate.
Also update the aggregate as mentioned use only one aggregate and apply year filter there.
regards
Hi, Would you mind to share an oml example for me on TaB change and how to use single aggregate and apply year on that for me study? Thanks,
Sure I can do that but it will take little bit time. But I think already provided all information and screenshot so you should give an try at your end first and in that face any issue then let me know.
Can you help check my code again.?Seems nth to show in the tab, take 2023 as example.
probably my code got some problem
And I would like to know if I click 2023, how can the count of card (Pending, partial, completed)on the top change as well? Thanks.