Show Total Number of Records from a Query


#1

We created a page, which returns records from a database query. We want to show the total number of records in a paragraph below the table:

Double click inside the paragraph, to activate the edit mode. Then click the dynamic data icon:

In the data picker, select your database query(1) and click the data formatter icon(2):

Right click the expression and then select the count formatting option, in the collections category:

Click Select:

And click Select to insert the formatted value on the page:

Then save:

And you are done, the total number of records is displayed on the page:


WapplerPrevious   WapplerNext



Wappler Official Documentation
#2

Very helpful! Thank you


#3

There are other options too. Eg if you wanted to show something like this, for a paged query:
records found: 139 | showing 31 to 40
Using the default names, you could use:
showing {{serverconnect1.data.query1.offset + 1}} to {{serverconnect1.data.query1.offset+serverconnect1.data.query1.limit}}
(for the second part)