How to loop through the item in a list view

  • 8 September 2013
  • 10 replies

Badge +2


As per subject, I have this rule:

1.) Populate a list view A using my own stored procedure

2.) User can choose to edit (or NOT edit) list view A to add in some additional info

3.) Copy data from list view A to another list View B for processing (I must use list view B for processing as list view B contains some other info needed for the processing)

I am stuck at step 3 as I can't find any rule that allow me to loop through item in list view A and populate them to list view B seeing user may or may not edit list view A.

Any advise?

10 replies

Badge +3

Have you tried using the 'Transfer Data' action, using the associated SmartObject properties of List View A to populate List View B?

Badge +2


Thanks for the reply. But can we use Transfer Data rule to transfer more than 1 item at one time?

Appreciate if you can share how the rule structure will look like.

Badge +3

Sorry, I just tried this and looks like it doesn't work. 

Are your two lists based on the same Smart Object?  If so, why not just hide the extra information that is shown in List B and show it when it is needed?  The Show/Hide Control action lets you show/hide table columns

Badge +2


Thanks for the reply.

Nope, it is 2 smart object that serves different purpose, it is just that list view A contain data that list view B needed.


Badge +3

In that case, could you not just use ListB with the Hide/Show column options that I explained in my previous post?

Badge +2


List A (link to SO A) contains: ColA, ColB, ColC

List B (link to SO B) need to display ColX plus ColA(from list A)

Am I able to use show/hide column for that purpose as both list is not link to the same SO?

Badge +3

Ah, I think I understand your problem now.  i think there is a way to link two Smart Objects together, but it is not something that I have done before so cannot advise how this would be implemented.

Is there a reason why you cannot just have one SmO that contains ColA, ColB, ColC and ColX which you can then base a single view on and show/hide columns as appropriate?

Badge +2


List A will contain "item", "total quantity" column.

List B will contain "item", "consume quantity" column.

So say item A contain total 10 unit, list B will need to capture each consumption of item A.


Badge +6

Has anyone figured out how to do this in K2 SmartForms?  I know how I could do it in a workflow event, but I really need to do it in a form.  Basically, I have a list of potentially available resources, and I need to iterate through that list and check it against a reservation calendar to determine what to show on the form.

Badge +13

Hi SmallDream, Wkucardinal


If i understand the request correctly, the best way to achieve this behaviour would be to associate Smartobject A with Smartobject B and then create a Item View (Item View B) from Smartobject B where you will then transfer the data from List View A (Created from Smartobject A) into Item View B which will be opened as a subview from List View A. where the comparison,calculation, ect can then be done agains the data from Smartobject A and Smartobject B based on the selection made in List View A, You can then bind the result to a text box in Item View B and return that result to List View A.


I do not think it is possible to loop through the items by itself, the only way to do this will be to loop through one by one manualy.


I have attached my package to this post for you to have a look at. Hopefully this is what you are looking for.

Pleas just run  "C6 - SMO - A List", click a record and refresh the page. You will notice that the data is returned after it has been compared and calculated in the Item view.


Kind Regards