Kanban limit items in a group

Hi there

I need to be able to assign people to groups in the most user-friendly way possible. Draggable elements provide the best user experience.

I’m trying to use the Kanban elements, the columns/groups are perfect for this.

My group have a capacity (all groups have the same). Thus, I would like to limit how many items (people) I can drag in each group.
Any idea on how to prevent the user from dragging too many items in a single group?

Thanks for your help and advice

Hi Popi :waving_hand:

Interesting use case.
I’m not sure you can block an item from being dragged but you can create a variable that controls if the group is full, ex “FullGroup”

Then, on the kanban workflow you can check for “On Item Moved”, Which is going to return a value for the dragged item origin and landing column.

You could run a check of your full variable vs the landing column, if true you immediately move back the card and show a popup that the group is full.

Makes sense?

Theorically, it makes sense for me.

Honestly, what I don’t know how to achieve yet is to “move back the item”. I didn’t saw any component action to move Kanban items.

How would you do achieve this action?

You just need to change the variable that holds that card position or column and then refresh the collection.

Thanks Agustin. Can you please show an example?
I can’t find where to find this variable except as a variable under the “workflow results actions” on a workflow which seems to be a read-only area

Hi Popy.

I recorded a video to help you understand better: