SmartForms - ListView Action Button?


Badge +3

Is there a way in SmartForms to have an action button in a ListView?  I would like to have a button on each list in the ListView so that when it is clicked, I can show the detail data that makes up that line.

 

I need to have the ListView editable, so I'm using the double-click event to put the ListView in Edit mode.

 

My SmartObject is calling a Stored Procedure that sums up data.  What I want to happen is when a button the ListView is clicked to call another Smart Object to get the detail information and open up a Sub Form.  The rules for grouping the data are pretty complicated, so I want to leave them in a Stored Procedure.

 

So I'm wanting to have a button that user will click to see the detail information.  But that doesn't appear to be possible.  Does anyone know if the ListView can have an action button in it?  Or if there is a better way to handle this?  Thanks for your help.

 

 


10 replies

Userlevel 1
Badge +8

Hi Terry

 

Buttons in a ListView row are not available at the moment, although I have heard they might be coming in a later version of SmartForrms.

 

Only options for actions at present are to use a toolbar button, or the ListView click and double click events.

Badge +10

I think this is definately possible but you may have to slightly modify. I would use an extra subview for this. So on you current list add a tool bar button at the top of the list view(not in each row). Name this button "View Details". So when a user seelcts a item in the list view and clicks this button, what you do is get the "ID" of that item and then you create a method that lists the details using the ID as the input parameter. You would then display this infomration in a subview. So you would have to create a view with all the fields that you want to show.

 

Hope this helps. 

 

Badge +3

s0m3one - Thanks for the suggestion.  My preliminary testing shows that way will work.

 

I'm trying to see if we can use SmartForms for this application instead of an aspx page.  Not having a button in the list will make the application a little more clunkier than I would like.  But In theory, developing in SmartForms should be quicker/easier than aspx.  If anyone has an opinon about that, I would love to hear it.  Thanks.

Badge +10

Great to hear that method will work. I think for simple forms ie: forms without list views smartforms should be quicker to develop. However, smartforms do not handle list views that well in my opinion.

 

You can only fit so many fileds ina single line. If you have anymore than about 7 coloumns, developing for various sizes of screen resolutions becomes very difficult. For example; in asp you can have a multiline list items, even when you have many fields in one row you can modify the structure of the row to display in multiple lines.

 

Another thing that smartforms list views struggles with is, it cannot render any other control in the display area other than text. For example, if you have a checkbox it will display as true or false text. It will ony show the checkbox control, if you click on the row item to edit it. This makes it difficult to create intuitive forms.

 

Hopefully, these willl be something that will be improved upon as time goes by.

 

Badge +1

Hi everyone,

Is there already a new solution in this topic? I still can't add the action button to list view. Help :)

I can add the button in designer view, but after finish it , in the preview it isn't appearing. 

I try add picture , hyperlink to solve this problem but picture is not apearing too, hyperlink apears but have not clicked rules. 

Any suggestions?


15629i39C2DEE79DAC1749.png
12169i55CD7487F2BA40DA.png
Userlevel 1
Badge +8

As far as I am aware inline buttons still will not work with list views.

Badge +1

So,  it is another simple function is missing :/ 

Badge +3

I was able to use a SharePoint Hyperlink Control in a ListView column to open the detailed Item data (via the default DispForm).   You should able to use the same technique to open another View or Form using the Runtime URL and proper parameters.  I had to use Display Type=hyperlink in the properties and an Expression using Inline function=Hyperlink to get this into a friendly format.  Then I was able to save my single and double-click options to perform other item/row-specific functions

Badge

Thank you MKIRSCH

 

From a newbie just starting out in K2, this helped a lot.

 

Regards,

Mervyn

Badge +3

Hi,

 

I have come out with a workaround which play around with the javascript and rules of the K2 smartforms. You may refer to https://briank2com.wordpress.com/2016/10/28/list-view-control-in-row-level/.

 

Please do take note, if you are using for editable list view, it could be slightly more complex as there is an list item on change rule that require to be disable due to the behaviour of the smartform to allow the function to work.

 

Please change all the single and double quote in the script provided in the blog as well.

Reply