squaladesign
Forms Fledgling

Row count function on ListView

Hi, I created ListView not editable with the pagination in K2 Five, I like to have a row count. I was using the function count but it's count only the number of row per page, I need the total number of row.

Anyone can help me?

Labels: (1)
0 Kudos
Reply
9 Replies
Prineel_V2
Canvas Initiate

Re: Row count function on ListView

Hi,

If its on a form then this is probably not a "best practice" solution, more of a work around:
Create a new list view (without paging enabled)

Use the count method again

Put the listview onto the form (make it invisible)

Create a data label on your form and transfer the count expresssion from the new view onto the data label:

Prineel_V2_0-1622557173292.png

 

Kind Regards

Prineel

 

0 Kudos
Reply
squaladesign
Forms Fledgling

Re: Row count function on ListView

Thank you Prineel for the workaround, however, if I'm doing that when a client will filter the table the count will not change, correct?

Can I connected in anyway the 2 views?

0 Kudos
Reply
Prineel_V2
Canvas Initiate

Re: Row count function on ListView

Hi,

Remember, the new listview is hidden and contains the same data as the first listview, and we are counting the number of rows from the new listview that does not have any filters, so it wont change.

0 Kudos
Reply
squaladesign
Forms Fledgling

Re: Row count function on ListView

Ok, so, it's not a solution 😞 I need to have the filters working for the count too.
I'm looking to create a Stored Procedure...I will see.
0 Kudos
Reply
Prineel_V2
Canvas Initiate

Re: Row count function on ListView

Hi, 

 

On your first listview, the one that will be displayed, you will have the filters. On the second listview, the new one, there will be no filters and you will count from the second listview. Therefore it will count all rows from the smartobject. 

 

0 Kudos
Reply
squaladesign
Forms Fledgling

Re: Row count function on ListView

In fact, I'm trying to count from the smartobject but I still not figure it out how to do it

0 Kudos
Reply
Prineel_V2
Canvas Initiate

Re: Row count function on ListView

Want to setup a meeting?

0 Kudos
Reply
squaladesign
Forms Fledgling

Re: Row count function on ListView

thanks, not at this stage but I will let you know. Which country are you located?
0 Kudos
Reply
Prineel_V2
Canvas Initiate

Re: Row count function on ListView

Im loacted in South Africa
0 Kudos
Reply