# Connections Between Kanbans

Composite Kanban allows you to drag cards between child kanbans. To manage this, you set relations between child kanbans. These relations are set for cards. Together, they form connections between kanbans.

To use connections, a composite kanban should have at least 2 [containers](https://docs.flexikanban.ai/composite-kanban/working-with-composite-kanban-layout) with [child kanbans](https://docs.flexikanban.ai/composite-kanban/working-with-composite-kanban-layout/configuring-child-kanban) configured. If you hover over any child kanban, an "Add Connection" icon will be shown:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FaYoaz3jVGbcanrl5XFZH%2Ffile.excalidraw.svg?alt=media&#x26;token=a8d16e79-7ea6-4119-851c-3c5c8a544c1d" alt="" class="gitbook-drawing">

If you hover over this icon, a tooltip will be shown:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2Fwcg2merWGPC33TzfmjLL%2Ffile.excalidraw.svg?alt=media&#x26;token=f40c5954-1567-4eb9-95fc-06f02749bab6" alt="" class="gitbook-drawing">

To start setting a connection, drag this icon to another Kanban container and drop it there:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FhinujwifNAqA9Eq5Rhg8%2Ffile.excalidraw.svg?alt=media&#x26;token=ff9b49a3-ece9-4066-99c7-48cb9a5b72be" alt="" class="gitbook-drawing">

A "Configure Connections..." popup will appear. It will contain data for Source Kanban (which card will be dragged from) and Target Kabnan (which card will be dropped to). By default popup will contain:

* names of these Kanbans
* list of cards from Source Kanban

Each card will show a number of its connections:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FXWNltpwCR0nwYzSMzIdu%2Ffile.excalidraw.svg?alt=media&#x26;token=0c4f49bc-d5fe-48ba-9d0e-ef82c7a54e2c" alt="" class="gitbook-drawing">

{% hint style="info" %}
Source and Target Kanbans names are links - if click them, proper Kanbans will be opened in Kanban Builder in the new browser tab.
{% endhint %}

Select card in the Source Kanban you want to configure relations to (realtions are the same as Column Junctions on standard dashboard). A list of Source Columns belonging to the Source Kanban will appear. Each column will show a number of it's connections:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2Fh6guLxfvpm4kVXGyboe9%2Ffile.excalidraw.svg?alt=media&#x26;token=e82c7711-8b9e-48de-a2ec-62206cfc8f3e" alt="" class="gitbook-drawing">

If select a Column of the Source Kanban, the list of available Target Columns (belonging to the Target Kanban) will be shown. Each Target Column will show amount of Actions that will be executed by card dropping:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FfDUybGvv6Brp2ydSM1OI%2Ffile.excalidraw.svg?alt=media&#x26;token=99984f0b-b534-4e78-b22f-0ae095326cf8" alt="" class="gitbook-drawing">

{% hint style="warning" %}
Each Source Column for each Card has the own list of Target Columns with own actions.
{% endhint %}

Check Target Columns where selected Card can be dropped from selected Source Column to. Badges with numbers of connectors will become yellow, and numbers of Actions will become red - this indicates that proper cards and columns have no actions set to their connectors:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2F6DH81o1PDpgSLby9qZ6j%2Ffile.excalidraw.svg?alt=media&#x26;token=9f2b7096-c0c8-49a6-b792-4af02b345e96" alt="" class="gitbook-drawing">

Select Target Column. A list of Actions set for this connection (Card - Source Column - Target Column) will be shown. By default it is empty. Also, Source/Target Drop Behavior forms will be displayed:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FlclOOT66bssTsPWcAMNN%2Ffile.excalidraw.svg?alt=media&#x26;token=08e8c62d-2308-4462-977a-2701981280c9" alt="" class="gitbook-drawing">

{% hint style="info" %}
You can select a Target Column that was not checked. After adding at least one action it will become checked, thus, a connection will be set automatically.
{% endhint %}

Click "Add" link to add a new or existing Action or Action Group (this process is the same as adding [Actions on Standard Dashboard](https://docs.flexikanban.ai/components/actions-action-groups)). You can add several actions by selecting them together. After being added Actions and Action groups will appear in the list. They can be rearranged by clicking ordering arrows and deleted. To delete actions check checkboxes near unnecessary actions and click "delete" link. Also, Actions / Action Groups can be edited by clicking "Edit" buttons:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FbvT9gvv5C8x9WOSoYoLY%2Ffile.excalidraw.svg?alt=media&#x26;token=8baafc7c-f252-4e5b-89fa-019057c251de" alt="" class="gitbook-drawing">

Actions can be copied to another connections. To copy actions and action groups, select them with checkboxes and click "Copy" link . After this proper information will be displayed. Actions will be copied to built-in application clipboard:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2Fa0YU0Q8AaUN3kyEqWTpL%2Ffile.excalidraw.svg?alt=media&#x26;token=400021f6-9924-4401-9d16-b0be4d506ffb" alt="" class="gitbook-drawing">

To paste copied actions first select necessary Target Column in necessary relation (it can be a connection between other kanbans too), then click "Paste" link. Actions will be pasted from app clipboard:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FoWDd9A1geGEt5KZbl78X%2Ffile.excalidraw.svg?alt=media&#x26;token=87f188b5-dd82-469e-9113-39830ee5d311" alt="" class="gitbook-drawing">

If copy another actions, they will replace previously copied in the app clipboard. To clear the app clipboard click the proper link.

To set how should behave Source and Target Columns when card is dragged and dropped, select necessary behaviors in the proper form.

Behavior of source column can be set to:

* **Remove Card** - card will disappear from the source column
* **Refresh** - source column contents will be refreshed and the card will remain there
* **Remove Card and Refresh** - card will be removed from the source column; source column contents will be refreshed; if the record, represented by dragged card, still match the source column conditions, card will appear there again
* **Do Nothing** - source column will not change it's contents

Behavior of the target column can be set to:

* **Refresh** - target column contents will be refreshed
* **Do Nothing** - target column will not change it's contents

After connections has been set and saved, an Output Relations section of the Source Kanban properties sidebar will show it. If click the link representing the connection, it will be opened in "Configure Connections..." popup for editing:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FAjDeWGZLRSrV8N81OkSk%2Ffile.excalidraw.svg?alt=media&#x26;token=f1cee9a9-79cd-4262-ad4d-a7c4f33933ef" alt="" class="gitbook-drawing">

The same connection will be also shown in "Input Relations" section of the Target Kanban properties sidebar:

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FR5jWxAI15XLePPwLZMia%2Ffile.excalidraw.svg?alt=media&#x26;token=fab30093-2fc0-442d-bcbe-187bf47a6f16" alt="" class="gitbook-drawing">

### Useful hints

If you have a composite kanban with several containers and they contain the same child kanban (for example, [Calendar Dashboard](https://docs.flexikanban.ai/composite-kanban/examples/calendar-dashboard)), you do not need to configure connectors between each pair of containers. The system stores connections between kanbans, not between containers. For example:

* You have a composite kanban with containers A, B, C, D, E and F
* Containers A, B, C and D have child kanban X, and containers E and F have child kanban Y
* In this case if you configure connections in the direction A -> F, you make junction X -> Y and you do not need to duplicate it with other connections (A->E, B->E, B->F, C->E, C->F, D->E, D->F). And to make junction from Y to X (Y->X), you need to configure only one of the following connections: E->A, E->B, E->C, E->D, F->A, F->B, F->C, F->D.

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FinB41vrWzvFn5jZaUP6C%2Ffile.excalidraw.svg?alt=media&#x26;token=c36e89ec-2237-4939-8714-80288a59cbbc" alt="" class="gitbook-drawing">

If you configure:

* connections between containers that all are containing the same child kanban, and
* the child kanban has junctions and actions configured (like on [Calendar Dashboard](https://docs.flexikanban.ai/composite-kanban/examples/calendar-dashboard))

you do not need to repeat these junctions and actions in the Connections popup. The only thing you need is to add actions to the junction between source and target column when they are the same. In a composite kanban, the same column can be a source and a target (in different containers). So, in the Calendar Dashboard example:

* actions for card dragging are configured in the child kanban
* junctions in the child kanban are set for all source columns to all target columns
* dragging from the source column to itself is not allowed within the child kanban
* the composite kanban has connections between the child kanban as source and the same kanban as target
* in these connections each source column is connected to one target with the same name and has proper action set, because dragging to other columns is already allowed in the child kanban
