Skip to main content
Solved

SmartObject Method GetListItems Getting the Returned Items Count

  • 20 March 2017
  • 3 replies
  • 6 views

Hello Techies ,

I'm Working with K2 for SharePoint and developing a SmartForm in that i'm using GetListItems SmartObject method , here i want to know the no of items this method returns . i couldn't find any direct actions or condtion for this.

 

I need to know how we can check the no of items returned on the excution of GetListItems Method.

 

Kindly help me here ,

 

Thanks ,

Esaki

 

 

3 replies

Badge +9

Hi, 


If you have a ListView on your form, you can use a DataLabel and add an expression to the DataLabel using the “List Count" operator from “List Aggregators” category and drag the column or SO property to the expression.


You can then hide the ListView if you do not want to ListView to show the items on the form.
When using this method you cannot have paging enabled for the ListView

Badge +2

Thank you for you response on this . this is what i have done now. but in many areas i need to compare the no of items returned from GetListItems SmartObject Method to complete the logic, in this case if we need to have ListView for all these i dont think so it'll be an effective solution as having multiple views on the form affects the performance.

 

Here we Should have an SmartObject Method Called GetListItemsCount with the filter options which will help us a lot.

 

Thanks,

Esaki.

Badge +9

Hi Esaki, 


There is a feature request logged for just such a method. At the moment there is no definite ETA on this feature.


 


Regards

Reply