Hey! I can’t figure out how to make some functions, but first, let me explain my thoughts:
I have made a table, connected it to a database, which then is connected to a text box, where users can leave a comment. They submit this comment by using the “submit button” (made pretty much according to the “Wix code handbook” 
Everything works. The setup is as the picture below. The red text are my comments, to show what the different things do. The expand button doesn’t do anything yet (should be working when problem is fixed).
Me problem is the following: I would like, as a standard when the page has loaded, to only show the first four comments. However, then I would like to have an expand function to show maybe the first 10 comments or so - how can this be done? It seems like that the only option is to either have a automatically expanding table as more comments enter or have a “scrolling” option to the table - neither is great for my use.
This is a link to the site, btw: https://rikkenielsen96.wixsite.com/mock-up/kirstenolsen
Many thanks in advance!
No exactly clear about what you want for the expand function, but you can maybe use the dataset setPageSize() to increase the number of items.
I hope that helps,
Yisrael
Thank you - i will try. How can I see the existing page size?
Nothing appears?
Also, I don’t quite understand what the size of the dataset (kommentarer læs) has any thing to do with the table size?
I’m really new at this, btw 
After the pageSize line, add:
console.log(pageSize);
The page size will now be displayed in the console.
Did you run in Preview? Did you open the Developer console?
Now it shows this alert. It didn’t the first time.
You need to put the code in the pages onReady() function, otherwise it is not available as stated in the error message.
You will need to familiarize yourself with the Wix Code environment as well as basic coding concepts to accomplish what you want. There are a wealth of Javascript coding sites which will help you learn Javascript from basic to advanced - Javascript.info is a good one. The Wix Code Resources page provides tutorials, examples, and articles on getting the most out of Wix Code. We are happy to get you pointed in the right direction, but you’ll need to take it from there. As questions or difficulties arise, we are here to help.
Thank you for your understanding.
I think that we have understood each other. I couldn’t see what you where trying to explain. Here is my problem: I have set the dataset to show 4 elements, however, it keeps showing more (it is set both by code and in the “manage data set”-menu.
I have shown it in the video here. I want table 1 to only show the first four user inputs - however it keeps showing all, even though I set the dataset to only show four?
Hi Rikke,
OK, it was an misunderstanding on my part. The “page size” of the dataset is for use with a repeater - not for a table. (I was helping someone else with a repeater and got confused)
For your table, you can use the getItems() function to get a specified number of items, starting at a certain item.
I hope this helps,
Yisrael