Skip to main content

Hi Folks,

 

I'm working on an invoice form right now. The positions are stored in a separate smart-object and use the invoice ID as foreign key.
It's necessary for users to select multiple positions and have them passed on to the workflow.
It's not (!) necessary for multiple positions to be edited at the same time, I just need the IDs!
(I feel this is important to emphasize as I came across multiple discussions on editing multiple list entries.)


So far I have tried several things to solve this - with mixed results:
1. Multi-select on the list-view through default select by mouse-click. This allows for a multi-select through holding down control, as expected, and returns the IDs just fine.
The main issue with this: It is not necessarily intuitive for the users and most importantly not usable on a touchscreen-device.
2. Using checkboxes in the List-View. They don't render. From what I've read they are just not available in list-views.
3. Combining a list-view with a seperate checkbox-list that's filled with the positions through a rule.
This technically works but falls through on design, as it is virtually impossible to make the checkboxes line up with the corresponding list-item.
4. Using the "list item clicked"-trigger to set a selected-field on the smart-object to true and applying conditional styles to positions with true in selected.
This works and (through the workflow) allows me to iterate through all positions assigned to a invoice that are have been selected.
Issue: To make it visible what position have been selected, it's necessary to refresh the list to trigger the conditional styles. This is a performance nightmare obviously. Also - let's face it - it feels like the worst hack ever to put the selection status in the database.

 

System: K2 4.7 August 2017 Cumulative Update

 

Any and all input on this would be appreciated!
I'm having a hard time believing that I'm the first person to have that requirement to a list-view...

 

Thanks in advance and take care,


Alex

For you folks with the same issue:

 

I created a "on list item clicked" rule for the view. This rule sets a "Selected" Field (Type Yes/No) for the Item to true and then executes a list refresh. I also added conditional formatiing to the view to show what items have selected=true.

 

A few more thoughts:

  1. I added conditions to the rule to select an item that was previously unselected and the other way around.
  2. The list refresh is necessary for the conditional formating to update.
  3. This solution is not very nice - performance wise. Saving the selected-state to the db is obvioulsy not the preferred way to solve this.
  4. I feel like it would have been "cleaner" to create a new smartobject using the item's ID as a primary key and adding the selected field. This would probably improve performance on the update of the selected-value as there is less data. I'm not sure how it would affect the perfomance of the formating, though, as the condition would require a lookup in a different table. For my datastructure I decided to not split it, but if someone tries, please let me know how it went!

This "Checkbox"/"Multiple Select" in ListView is exists like along time ago, and yet no "Easy" solution / Update came up.
I think this kind of feature should be implemented "Out Of The Box".

Reply