Transcript
In this Quick Tip, we're going to learn about the count operator.
When you have a list of things, like a list of comments, you may want to display how many there are. As you can see, our Comments database is filled with entries, and if we wanted to keep track of how many entries, and display that number to our users, we would do that dynamically.
Here in our Design tab, we'll make a text box and Do a search for our Comments. Our search expression won't be complete, as the search returns a list, but if we click more, we now have access to operators to evaluate our search away.
From that list, we can then simply select the count operator which will count how many items are returned from our search. Since this is dynamic data, each time we add a new comment, the count will automatically adjust.
With this expression complete, when we preview, we get the count of the list of comments.
Be sure to take advantage of the count operator. While it's a lightweight way for you to get real-time updates on how many things are in your database, it's also a great way to do calculations and comparisons on elements and workflows.
That's it for this Quick Tip! For more, be sure to check out bubble.io/academy.