# How to build a link to a Kanban

Link to a kanban can be built in two ways:

* Combine relative or absolute URL of kanban page with necessary parameters
* Use **BUILDDASHBOARDLINK** function

### Use of kanban page URL

This way is suitable for **URL/Navigate actions:**

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FmLiVxOHjV1Ihj3lVT36T%2Ffile.excalidraw.svg?alt=media&#x26;token=7fc05688-a8ab-4a9e-949a-6b4010e7f610" alt="" class="gitbook-drawing">

* Add an "**URL**" type [handler](https://docs.flexikanban.ai/standard-kanban/tools/configuring-handlers) to necessary kanban element.
* Set URL **Value** to relative or absolute path to kanban page or component:
  * Absolute path depends on server/organization you refer to.
  * Relative path may depend on page structure and will refer to the current server/organization; e.g., relative path can be like this: **/lightning/cmp/c\_\_KanBanComponent**
* Select which browser window the page will be opened in - **the same** (will go out of kanban) or **new window/browser tab**.
* Add the necessary parameters.

Parameters for Kanban Component, used in this example, are:

* **c\_\_style** = some CSS styles, that will be applied to Kanban container;
* **c\_\_variables** = JSON with variables that should be passed to Kanban opened (optional);
* **c\_\_kanbanId** = ID of Kanban to open (may be set directly or via [merge fields](https://docs.flexikanban.ai/standard-kanban/tools/using-merge-field-picker));

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2F7BwvMe18q5iKZ6MH4HVm%2Ffile.excalidraw.svg?alt=media&#x26;token=2acece4e-8b6f-4cf5-84cf-4d17d78c57c3" alt="" class="gitbook-drawing">

### Use of BUILDDASHBOARDLINK function

This way is good for places where a link should be generated as HTML, instead of script-driven actions. For example, to build links in email messages.

The BUILDDASHBOARDLINK function can be selected via merge field picker and should be called in this way:

<mark style="color:red;">`BUILDDASHBOARDLINK(dashboard_id, variables, styles, as_html_tag_optional, text_optional)`</mark>

The parameters are:

* **dashboard\_id** = ID of Kanban to open
* **variables** = JSON with variables (in quotes '...') that should be passed to Kanban opened (optional; set to null, if not needed)
* **styles** = some CSS styles, that will be applied to Kanban container, in quotes ('...')
* **as\_html\_tag\_optional** = true, false or null (that will be equal to false) - asks system if generate link as text, or as \<a>...\</a> HTML tag
* **text\_optional** = some text or null - sets the substitute text, that will be content (not "href") of \<a> tag generated

Function should be wrapped with FORMULA\[] operator and can be validated with [formula editor](https://docs.flexikanban.ai/standard-kanban/tools/using-formula-editor).
