Buy Now
Sign in

Paginator problem

kkurtz , January 23 2019, 23:26
K
kkurtz 139
January 23 2019, 23:26 #383217
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 8
January 23 2019, 23:45 #383219
If you hover over one of the numbers, what does the link point to out of interest?
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
K
kkurtz 139
January 24 2019, 00:06 #383225
It points to the CC connection and then the event that displays the list.
healyhatman 8
January 24 2019, 00:21 #383226
Depending on your filtering setup, it should also be pointing to a startat value right?
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
K
kkurtz 139
January 24 2019, 02:10 #383229
I would think so. Do I have to specify that some how?
healyhatman 8
January 24 2019, 02:46 #383233
No just checking. Put a debug: at the end of your event make sure the data you need is actually there maybe?
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
K
kkurtz 139
January 24 2019, 19:36 #383260
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 8
January 24 2019, 21:24 #383263
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
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
K
kkurtz 139
January 24 2019, 22:09 #383268
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 8
January 24 2019, 22:11 #383269
Put a /- after the where conditions to say skip if the condition is empty
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
K
kkurtz 139
January 24 2019, 23:44 #383271
Things seem to be working a bit better now.
Thanks for your help.
Karen
W
webbusteruk 119
January 29 2019, 11:30 #383403
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.