# Link Data Field

The Link Data Field is a field which generates a button that links to another bloc. It also passes data to this other bloc through the url. This is a useful way of loading blocs straight from the data results and passing in data to the bloc you are about to load.

![](https://1186088597-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MSr2uF2m-DtSpCxknCK-887967055%2Fuploads%2FHS1k7byQhVg9vmj8a8rV%2Fimage.png?alt=media\&token=7e0d85b2-0876-4d97-b3a4-6dfef0b696ea)

{% hint style="success" %}
This might be used in a situation where you want to load information about a certain company. By passing in the company name, and setting the [Filtered Field parameter](https://manual.blocworx.com/blocworx-documentation/managing-a-field/field-parameters/main-field-parameters#data-filtering-field), the data in the destination bloc will load just that companies data.
{% endhint %}

The button can appear either in the form, or in the results. The resulting url may look like the following: [https://example.blocworx.com/module/odm-app/bloc/1234?urlFieldSlugData={"company\_name":"Blocworx"}](https://example.blocworx.com/module/odm-app/bloc/1234?urlFieldSlugData={%22company_name%22:%22Blocworx%22}) (note that this may appear as the following in the url bar: <https://example.blocworx.com/module/odm-app/bloc/1234?urlFieldSlugData=%7B%22company_name%22%3A%22Blocworx%22%7D> but is still correct)

In the above example the value of a field called Company Name is being passed into the url.

The resulting url may also be a custom url with normal parameters being added, e.g.\
[https://www.example.com?company\_name=Blocworx](https://www.example.com/?company_name=Blocworx)

Again in that example the field calledd Company Name is being passed in.

### Initial Field Parameters <a href="#initial-parameters" id="initial-parameters"></a>

| Parameter                                                           | Description                                                                                                 |
| ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| Type Module name (min 3 letters, leave blank to use current module) | Used to find the module you would like to use in order to find the bloc to link to.                         |
| Select Bloc                                                         | The Bloc you are intending the button the link to                                                           |
| OR Enter Custom Url                                                 | This options allows you to enter your own url instead of choosing a bloc.                                   |
| Opens in New Tab                                                    | This opens the link in a new tab                                                                            |
| Text on Button                                                      | This text will appear on the button (which is the link)                                                     |
| Choose Button Colour                                                | The colour of the button                                                                                    |
| Select the fields to add to the Url.                                | All the values of these selected fields will get appended to the URL as described in the description above. |
| Return to this bloc after submitting the form in the linked bloc    | Check this box if you want to return to this bloc after submitting the form in the linked bloc.             |
| Only Filter Data in the destination bloc                            | When checked, this prevents values from being set in this bloc.                                             |
