# Populate another local field with data from elsewhere

As one of our most commonly used rules, this is used to pull data from different blocs. This is a way of looking up data elsewhere based on certain values/criteria, once we find the data we can set the local field which will get populated.

{% hint style="success" %}
Hint: Don't forget, we can have a chain of rules on different fields, so once data gets populated to a local field as a result of this rule, we can have the exact same rule on that local field and it will automatically get triggered. It is a useful way to gather several bits of data from several blocs even if we dont always have the same joining values.
{% endhint %}

![](/files/-Ma4SYhhYAOM9dsmA5bo)

### Rule Parameters

| Parameter                                       | Description                                                                                                                                                                                                                                                                                                                                                                                  |
| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Bloc to Look Up                                 | The Bloc that contains the data we are looking for. (Note, the "Type Module or Job Name" field is not a rule parameter and is simply used for finding blocs in your instance.)                                                                                                                                                                                                               |
| Data Required Field                             | The field in that bloc which contains the data you want.                                                                                                                                                                                                                                                                                                                                     |
| Local Field to populate                         | This is the field on your existing bloc where you are adding the rule, its the field you are going to populate with the response of this rule.                                                                                                                                                                                                                                               |
| Default Data if Field not found                 | If this is filled, when it does its search for data, if it fails to find it we can populate the local field with this value, e.g. "No Data Found". By default if nothing is found it overrides any data in the local field with a blank entry. By typing "IGNORE" it will keep the existing data in the local field.                                                                         |
| Choose Fields that must match in the other bloc | <p>Here we send over matching pairs of local fields and fields from the other bloc.</p><p></p><p>For example, we might want to find data about an individual in another bloc, but just searching their name may not be accurate enough, so we will send over both their name and date of birth, and both of these will then need to match in the other bloc so the person can be found. </p> |
| Only extra parts of string (optional)           | An advanced feature which allows for the extraction of specific parts of a string based on user-defined formats. For example, A scanned barcode like T6W24H3849293852 matches the predefined format T6W24&&&&&&&&&, extracting T6W24. Similarly, SH24A999B matches SH24&&&&, extracting SH24                                                                                                 |
| Get first record instead of more recent record  | By default the rule will return the most recent record, but when this option is checked it will return the very first record that matches.                                                                                                                                                                                                                                                   |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual.blocworx.com/blocworx-documentation/bloc-editor/managing-a-field/field-rules/populate-another-local-field-with-data-from-elsewhere.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
