How to count the unique records for a column on a page

How to count the unique records for a column on a page

salxsalx Posts: 1Questions: 1Answers: 0

New at this, so apologize in advance if I'm not specific enough.

I am trying to count the number of unique rows in a column, but on a certain page. I have a bunch of building listings and I only want to count the building if it is unique.
I know how to do it for the entire building column --

table.column(2, {search: 'applied'}).data().unique().count()

But is there a way to count it on a page? so that I can print something like

Showing 1 to 5 buildings out of 10 total buildings

Thanks!

Answers

  • colincolin Posts: 14,610Questions: 1Answers: 2,493

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

Sign In or Register to comment.