Hi all,I have a buttongroup which filters list of projects epending on active, inactive, all. The button group works fine but the pagination does not work.
Action:
ButtonGrp : Passing hard-coded 0
Navigation\Pagination : Passing Event Param
Hi,Please share the Action reference attached to paginaion.Addtionally make sure you're refreshing the source aggregate under the same.If possible share the sample OML.Ref:https://success.outsystems.com/documentation/11/building_apps/user_interface/patterns/using_mobile_and_reactive_patterns/navigation/pagination/Good Luck
Hi @assif_tigerMy aggregate bound to the table has a filter and has a max record of 10:On ButtonGroupOnchange, I refresh the GetProjects which has the filter from the image above: Then for my pagination, I also refresh the GetProjects.The problem is the pagination does not work:
Please find the attached POC sample- I added a table , sort , pagination & buttongrp- Used OS-SampleDB Table- Ref same action for both ButtonGrp Onchange & Pagination- Note: I am passing 0 as NewStartIndex from ButtonGrp to reset the pagination when filtering source by ButtonGrp- My max recod is set to 5 for better understanding the pagination & filterDemo:https://assif.outsystemscloud.com/pagipoc/OML Attached_ Good Luck
Hi @assif_tiger Our code looks exactly the same however my pagination still shows 11 to 11 of 11 items.
Please confirm:
- You reset the StartIndex as 0
Please share OML
Hi @assif_tigerI can't share OML as it's in dev env. However, I tried reseting the StartIndex as 0It worked in active projects but in ALL projects, it gets back to page1
Thanks @assif_tiger ,Pagination:Pagination action:Our code looks really the same, yet I still can't fix it
Sorry this may sound funny but just confirm- Value you declared on each buttongroup item- Debug the ButtonGroup Change event & notice the IsActive_Filter value; as this one is responsible to bring the filtered data - Please confirm whether or not you have InActive records in table :)
@Siaming Ming : Your code looks good. I created a sample application on my end following your approach, and it works. Looking at your pagination screenshot, while you are on page 2, it should display only 1 record (11 to 11 of 11 items), but it shows 10 records instead. Do you have any other screen aggregates, and could any of them be incorrectly assigned to the table?Also, please handle the 'On After Fetch' event of your aggregate and attach a debugger to see what might be going wrong.
Hi @Siya I only use one aggregate for the table but it still shows 11 to 11 of 11 items. I have checked the aggregates and it should work fine but still went wrong
Hi @Siaming Ming,
If possible, could you please share the OML file?It would help in resolving your issue more effectively.
Thanks
Hi @Aditi Saraswat Thank you for your response. I can't share OML file as this is in dev env.However when trying to reassign 0 as startIndex, it works in active filtered projects but not in All projects. It simply go back to page 1
Assign the value of NewStartIndex to the StartIndex local variable, which is used to fetch data from the aggregate, and pass the NewStartIndex value to the OnPaginationNavigate action.
When the "All Projects" button group is clicked, pass 0 as the value for NewStartIndex.
Hope this helps.