SmartForm Item View Click

  • 13 October 2015
  • 3 replies
  • 1 view

Badge +4

Hi Mates,

 

My requirement is I had 2 SmartObject

  1. Which fill out the below table.
  2. Based on the User click in list item it will display related data. E.g. Suppose User click on Rick- Open Request. So it should display the Open request assign to Rick from SO.

Can you please help me to achieve these requirement since I am not aware I will I can find the column Name and User Name on click event of list view and display data in another List Item.

 

Its possible to bind the data to hyperlink and when user click on row it will display data in another Listview. and on whcih rule we sould call this another List Item

 

User Name

Open Request

Closed Request

Rick

10

20

Martin

15

5

 

 


3 replies

Userlevel 1
Badge +8

Hi de

 

From your requirements, it looks like you need a form with 2 views.

 

The first view will be a list view using the SmartObject for your table (as posted above) as the data source. The second view will be an list view using the SmartObject for the Open Request as the datasource (I am assuming in your example that if you select Rick then you want to see a list of the 10 open requests. I am also assuming there is a foreign key in your Open Requests table that links to the first SmartObject)

 

You will need to configure a rule on your form for the item click event on the list view. This rule will call the "execute a view method" action, calling the list method on your second list view (Open Requests), and passing in the ID from SmartObject for the first list view as an input parameter. You can access the SmartObject for the list in the context browser by expanding the SmartObject node for the view and selecting the required property.  When you select a row in the list, the the value for the selected SmartObject property will be returned.

 

I recommend you go through the K2 SmartForms Builder course to familiarise yourself more with SmartForms.

Badge +4

Hi Andrew,

Thanks for your reply.

I would like to filter the SO result depending upon the user request.

Now in my SO result all closed and Open request data is coming.So now if user click on

 

Rick -->> Open request.

so i would like to filter the result bases on user selection.now i would like to show only open request for Rick.

Can you please suggest how i can check which Column user has click and take that column header to filder the data.

Userlevel 1
Badge +8

Hi de

 

You can't tell what column the user has clicked, but you can tell what row. 

 

When you call the list method on the second list view (Open Requests) you can pass in any property from the smartobject for the selected row. In the context browser expand the View, then the SmartObject and then select the property (column) that you want to use. At runtime the value for the property for the selected row will be passed.

 

 

Reply