Forums

Paginator problem

kkurtz 23 Jan, 2019
I have a paginator on a filtered list which isn't working properly. I have it set to Navigation and length switcher.
The page length on the read action is set to 30 and the paging for multiple results is set to Enabled.
When the list is first displayed the 1 on the paginator nav is highlighted and the list shows 30 records. However when I click on any of the other page numbers in the nav, the records in the list disappear.
healyhatman 23 Jan, 2019
If you hover over one of the numbers, what does the link point to out of interest?
kkurtz 24 Jan, 2019
It points to the CC connection and then the event that displays the list.
healyhatman 24 Jan, 2019
Depending on your filtering setup, it should also be pointing to a startat value right?
kkurtz 24 Jan, 2019
I would think so. Do I have to specify that some how?
healyhatman 24 Jan, 2019
No just checking. Put a debug: at the end of your event make sure the data you need is actually there maybe?
kkurtz 24 Jan, 2019
This may be a better description of what is happening:
The connections starts off with a listing which is the result of a read action relating two tables.
The read action is set to a page limit of 30, All Matching.
The table is over 1700 records so that delivers 58 pages,
At the top of the list there is a form with radio buttons which allows the user to select which group of records they want to see. They choose an option and the filtered list is delivered via a different read action (page limit here is 20) when the submit button is clicked.
If the user is on the first page of the first list when the option is submitted the filtered list starts on its first page and the paginator performs correctly.
If the user is on another page, say the second page (so its starting record is 30) when the user makes the radio option selection the second read action delivers the list starting at record 10 and the debug code shows.
LIMIT 20 OFFSET 10
So it is starting at the 11th record. This particular sublist has 41 records. The first page starts at 11 and shows thru 31, The second page shows 32 thru 41. But the paginator thinks there are 3 pages. And you can't see the first 10 records.

This doesn't seem right to me.
healyhatman 24 Jan, 2019
Don't use a different read action when filtering do it through the main read action. Could Also try send startsat=0 with the filter submission to reset back to page 1
kkurtz 24 Jan, 2019
If the main read action is unfiltered, how can I filter the same read action when I need to? How do I send start at = 0?
healyhatman 24 Jan, 2019
Put a /- after the where conditions to say skip if the condition is empty
kkurtz 24 Jan, 2019
Things seem to be working a bit better now.

Thanks for your help.
Karen
webbusteruk 29 Jan, 2019
Re: sending "start at =0" for the filter, in your filter form there will be a field called "Action URL and/or parameters".

If you put "startat=0" in the box, when that form is submitted (eg to event called 'filter') the URL will become
www.example.com/list?conn=connection&event=filter&startat=0
If you use debug, you will find that there will be a new variable called startat with value 0.
This topic is locked and no more replies can be posted.