K2 Repeating table.


Badge +2

Hi guys, I am new to K2 and struck up with working on Repeating table in k2. Can someone help me out with a step by step process of following :

1. creating a repeating Table .

2. saving Reapeating table values.

3. Fetching the values of repeating table for display/Edit view. 


10 replies

Userlevel 5
Badge +16

Hi,

 

If you mean by repeating table editable list, have a look at the following link:

 

http://help.k2.com/onlinehelp/k2smartforms/userguide/1.0.4/webframe.html#editable%20list%20view%20layout.html

 

let me know if this is what you mean so we go on with the next steps

Badge +2

Hi Musthafa , 

 

Thank you for yua kind rply, this is what i was luking for, am done with the creating a repeating table. I am trying to do a simple start-up application in k2, so i decided to do a Travel claim System. Initially i hade two fileds for capturing travel details, namely "mode of travel" and the "fare" for it. If these two fields are made as repeating table along with an attachment, it would be easier for the user to track his entire travels done in a trip. i have attached an image of my application. let us move on  to link this smart object with the "Travel Claim" Form and save the values in its list.Later please help in, how to fetch the values of the repeating table , to show it in a display view.

 

Thanks and regards,

 

Karthick Prasanna :)


15738iC4F2259500B63371.png
Userlevel 5
Badge +16

Hi,

 

There are two ways to do this according to your requirements:

 

1- 

When Save button is clicked 

 

Execute Smatrobject method(here you choose the Smartobject of the editable list and execute it's create method then you have to configure it and map the values in the input properties).

Execute a view method( here you select the editable list and execute it's refresh method to show the last saved data from the above action).

 

2-

 

When Save button is clicked

 

Add new row to the editable list

Transfer data (here you transfer the two fields you want to fetch, make sure you transfer them to the controls in the Add/edit section)

Apply the changes made to the row on the editable list.

 

in this way the user will have to click save on the editable list to save the data.

Badge +2

Hi Musthafa, 

 

Where should i add these rules? in form or in view?

 

for method 1 : is there any output mapping ?

can you share some screens so that it will be better for me to understand, as am very new to K2.

 

 

Thanks and Regards 

 

Karthick Prasanna :)

Userlevel 5
Badge +16

Hi,

 

the output values of method numbet one is the ID of the created item.

 

I'll post some screens on both methods ASAP.

 

 

Badge +2

Hi Musthafa, 

 

Thanks for yua kind replies, waiting for your screens, 

 

Thanks and Regards , 

 

Karthick Prasanna :)

Userlevel 5
Badge +16

Hi,

 

I have created a form similar to yours with Item view and list view, we are going to set the rules on the form level.

 

here is my form:

 

14255i84642A9F67845E43.png

 

the first and the second action are called " execute a view method".

 

the first action is to insert a new record and it's configure as the following:

 

13995iBC9E1AE3E57A249E.png

 

wish this helps

 

Badge +2

Hi Musthafa, 

 

Thanks for your kind Reply, i will try this is method and post my status on doing this.

 

Thanks and Regards , 

 

 Karthick Prasanna :)

Badge +2

Hi Musthafa, 

 

It worked, thanks for yua support.Great job.. Keep it up.

 

Thanks and Regards,

 

Karthick Prasanna :)

Userlevel 5
Badge +16

Hi,

 

Glad to know that, you are most welcome :)

Reply