Hello,
When I create a dataset to a data collection, it only allows me to display up to1,000 items.
I have a song list with 90,000 items. I obviously don't want to display them all on one page, but how can I make all of that data available to a paginated table?
Thanks
Hi Ken,
I'm sorry if I led you to believe that I would allow singers to add songs to the database - not at all. I want for them to select a song already displayed, and then click a link to add that song to their list of songs that they want to sing tonight.
I'll have a page which displays the current roster, and the upcoming songs for each singer, like this:
Singer Next Song Next Next Song
Sean "It Takes Two" by DJ Rob Bass "Train in Vain" by the Clash
Ido "My Way" by Frank Sinatra "Hunger Strike" by Temple of the Dog (Duet with Ken)
Ken "Add it up" by Violent Femmes "Rock Lobster" by The B-52's
Then people can refresh the page on their phone, or I can display it on the screen between songs, so people know when they're up next. And they can submit song selections without having to stand in line to talk to me (sometimes I literally have 3 people waiting in line just to tell me a song).
As far as people paging through 90,000 songs, most karaoke jockeys print out a list once a year or so, that takes hundreds and hundreds of pages (6" thick book) double-sized print, small font, packed full of songs. One book sorted by songs, one book sorted by artist. No "genre." Singers will grab the books, go back to their table, and page through it looking for a song. Maybe they're looking up a song they know to see if the karaoke jockey has it, but that's not a great method as most books don't have all of their songs, and many KJs will download a song for you if they don't have it.
What those books are more effective for is giving singers some ideas - they may see the song "Bathwater" by No Doubt, and that's not the song they want to sing, but it inspired them to sing No Doubt, so now they're singing "Spiderwebs."
And sure - I don't want for people to access the page with the idea that they're going to scroll through 90,000 songs to find one they want to sing - I figure most of them will filter and search, but some people really just like to scan lists of songs with their eyes until something pops out at them.
Hi Sean,
Yes, if you display 100 per page and, the user clicks 'Show next' 10 times it would go beyond 1000.
A dataset can only display 1000 items at a time, however there is no limit to the number of records you access.
I think all they're saying officially is that per dataset you can have up to 1000 items. But I'm pretty sure that just means you can get more creative with having more datasets. In your case you could have 90x datasets to fulfill your 90,000 needs.
If you look through the Tutorial Articles under the Wix Code Resources, you'll see the pagination options are built to go through a single dataset, but that doesn't mean you'll be able to paginate through your huge database.
I'd recommend thinking about the situation from an actual use case. No one is going to want or have to page through 90,000 via 100 items per page. I'm sure they'll be searching/filtering for results by things like artist, genre, etc. These all can be taken care of using the dataset query functions and even through reference fields.
Submitting songs is an entirely different "project" in itself, because I'm assuming you would want to verify and vet all submissions before adding it formally to your 90,000 item collection.
TLDR, if you start designing your user interface and actual usage first, you'll realize the 1000 cap per dataset is not an obstacle to you. If anything it forces you to be a more efficient programmer.
Hi Ido,
So if I make the table show 100 records per page, and they click Next page, they can click more than 10 times, and it will keep loading records beyond the 1,000?
My specific example is for karaoke. I have a database on Wix with 3,500 songs in it currently, which is being added to several times a week. It will eventually reach tens of thousands of records, and I'd like for people at my gigs to be able to scroll through them all. I have 90,000 songs in my Virtual DJ database, but I only export files that I've manually sorted and tagged correctly.
My next step for this is to allow a user to select a song and submit it on their list of songs to sing. I'd like to have a list of singers on a roster in a particular order, with their submitted songs displayed next to their names. Singers can then refresh this page on their phone and see how far away they are in the queue - am I up next? Am I up in 10 singers? What are other people singing so that I know what to sing to fit in?
Then they access the list of available songs, select one, and submit it for an upcoming song for themselves. I'll refresh the page and see their submission (or, ideally, I'll be notified when a new submission is made) and look their song up in Virtual DJ and add it to the queue.
I'd also like to be able to look up a singer in the database, see what songs they've sung in the past, how many times, etc.
Right now, I use a Google Sheets spreadsheet for this, and that's honestly more advanced than what most Karaoke Jockeys use. If I can develop a good enough interface, I might be able to charge KJs access to this - if it can keep records of their singers, songs sung, # of times, dates, etc.
There's some karaoke software which does some of this, but it has other limitations and most KJs don't use the feature even if they use that software.
I know this sounds a bit ambitious, but I can get there with a little guidance from you experts :) We'll take it in steps, I don't expect solutions for everything I listed here in a single thread on the forums, I'm just letting you know my eventual goals for this.
First is to make all of the songs I've uploaded available in a list and allow users to filter and sort. Once we get that down, we can move on to the next step :)
Hi Sean,
The page code on your 'Songs' page contains the string 'Songs'. see below:
Using a dataset it is possible to display up to 1000 records at a time, however the number of total records you can cycle through via pagination is unlimited.
Ido,
If a dataset is limited to 1,000 records, then there's no way for me to allow someone to view a database of 90,000 songs? Even 1,000 at a time?
Hi Ido,
Are you talking about $w.onReady(function () {
//TODO: write your page related code here...
?
If so, it's on all of my pages. If not, then to what are you referring?
Hi Sean,
Datasets are limited to 1000 records at a time.
Your dynamic page dataset allows you to enter an unlimited number due to a bug as it should be limited to 1k records as well - we are working on a fix. Thank you for bringing that into our attention.
Regarding your question - a Table allows you to set its pagination parameters, see more here
BTW, I noticed that you have an unnecessary string which messes up the syntax inside your 'Songs' page code.
Note, this behavior exists on one of my pages, but not another. On the Songs page, any time I change the number above 1,000, it changes it back to 1,000. On a workout reviews dynamic page, it seems to let me set the number to whatever I like.