Need to group data in k2 smartform List View

  • 12 August 2014
  • 3 replies
  • 9 views

Badge +1

I am using K2 smartform and I have a requirement to Group data in List view and Show Sum of each group as subtotal.

Is it possible in K2 smartform using out ob fox feature.  If not can we create a user conrol and use in smartform ?


3 replies

Badge +7

I apologize that this is a late reply. However, just in case someone else gets confused in the future, I hope this helps. First off, I assume that by 'out ob fox feature' you meant out of the box feature. With that, yes what you are asking can be accomplished!

 

You would first need to Design a new View off of a SmartObject. From there, you'd go through steps of specifying the Layout, Parameters, Rules, etc. What would be useful to know in your case would be that you can choose the specifics items to show on List View on the Layout step in the bread crumb bar. You would select the Create Labels and Controls link and then pick the items, or data, you want to display in List View. To show the sum of each group, select the Column tab in the Properties panel column and then use the Properties panel (bottom right). Select the column of data you want to show the subtotal on. Look for "Aggregation in the panel and then click click the Add link next to Sum. 

 

I know that may not be extremely clear so here is the link to some learning material that walks you through a similar task step by step. I believe Lab 4 would help most for this situation (Page 29).

 

Regards,

Alyssa

Badge +3

Alyssa - I'm new to K2.  It appears to me what your describing is how to get a sum of all of the rows in the ListView.  Not a sum for each group.  Or am I missing something?  The 200.YUL lab you mention doesn't show getting a sum by group.  Unless I'm totally missing something.

 

What I need to do, and I think the original question is something like this:

 

Group 1

Row 1

Row 2

Group 1 Total

Group 2

Row 1

Row 2

Group 2 Total

 

Is that possible in K2?  And is there a way to only show the totals for the Group?  Until the user clicks on a plus sign to expand to show all of the rows in the group.

 

Badge +3

I found this thread that confirms that what I want to do isn't possible with K2.

 

http://community.k2.com/t5/K2-blackpearl/Grouping-the-list-items/m-p/73413#M21130

 

But the suggestion of showing a drop-down list of the possible names might be an acceptable solution.

 

 

Reply