# Floating Patterns and Floating Fields

A floating field pattern in Astera refers to the data points that are scattered throughout the report. The *Floating Pattern* option in Astera allows you to capture each data field no matter the location.

With this option, you must first specify a pattern in the pattern-matching bar and then check the *Floating Pattern* option. When the *Floating Pattern* option is enabled, it will capture all the lines that match the specified pattern.

## **Floating fields**

The *Floating Field* option will automatically appear when the *Floating Pattern* option is checked. This option will capture all the misaligned data fields. It is enabled by default, however, you can disable it if you want the field positions to be fixed.

## **Working with Floating Patterns and Floating Fields**

To work with floating patterns and floating fields in Astera, follow the steps mentioned below:

1. Go to *File > New > Report Model* and provide the path to the report on which you want to apply the floating pattern option. Click *OK*. The source report will open on the designer window.

You can download the sample text file here.

{% file src="<https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2Fgit-blob-5d35c4a88a9fd56a70f394c72236b2671d034b1d%2F4-Floating-Patterns.zip?alt=media>" %}

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2F7lfXBYN6jFHyeSSCsF3l%2Fimage.png?alt=media&#x26;token=143f5f88-15e9-4fc5-940d-686d091bdd29" alt=""><figcaption></figcaption></figure>

2. Right-click on the *Record* node present in the Model Layout panel and click on *Add Data Region.*

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FuKaKWNypJZitpCerJyjh%2FFloating%20Patterns%20Gif%201.gif?alt=media&#x26;token=d522ccf6-e9e3-4456-a839-c9d441e87957" alt=""><figcaption></figcaption></figure>

You will see an orange bar, which is the *Pattern-Matching Bar* appear along with the *Pattern Properties* and *Region Properties* section.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FlqmMRyxr555AKuCOah3e%2Fimage.png?alt=media&#x26;token=506142c2-b6d4-47e5-bb48-d10fc4e53d92" alt=""><figcaption></figcaption></figure>

Write a pattern in the pattern-matching bar to capture the desired data region in your report. In this case, "**ÆÆÆ-ÑÑÑÑ"** is specified as the matching pattern "**\*\*.\*\*"**

All data regions and data fields except the misaligned ones will be captured.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FKUPH2yV1SGj8MFu448qT%2Fimage.png?alt=media&#x26;token=42989adb-3e95-490d-a845-122b71c48416" alt=""><figcaption></figcaption></figure>

3. Now, check the *Floating Pattern* option in the *Pattern Properties* section. You will see that all the misaligned patterns and fields will be captured.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FopRDJrni5HBR6A0xMdkK%2Fimage.png?alt=media&#x26;token=b3808772-5190-45fe-88ac-04e7e1c8a6e5" alt=""><figcaption></figcaption></figure>

4. Right-click on the data that you want to add in your data field and click on *Add Data Field*. This will create a sub-node in the model layout. This sub-node is a data field and contains the data that you have selected.

In this example, a sub-node for *ITEM* has been created with all the *ITEM* data being captured.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FKoUDyF5SlQB0PcsrQD95%2Fimage.png?alt=media&#x26;token=8e5574e9-3b79-4107-9d88-343fcf5c4e71" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note:** The *ITEM* column in the first data field contains null values under *OFFICE CHAIRS.* Astera allows you to use any value from the “*Value if Null*” option in the *Field* *Properties*. In this case, we have selected the *Use From Previous Record* option.
{% endhint %}

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FsPtaieGPjtetEZhDlutR%2Fimage.png?alt=media&#x26;token=896f9e92-2f65-442a-9223-df6e131b8c4b" alt=""><figcaption></figcaption></figure>

5. Repeat these steps to create other fields.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FeEd9cJJW2UbFGqp7BJwH%2Fimage.png?alt=media&#x26;token=21b433c5-0faa-4f89-b46d-762e73dff6ca" alt=""><figcaption></figcaption></figure>

6. You can now preview your data by clicking on the *Preview Data* ![](https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FyqDMJla2xditXyUSzDEY%2Fimage.png?alt=media\&token=fdc42961-700e-4ab8-8a1b-f2945e1c17ab) option in the *Toolbar*.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FWYNIJyLaw4oHY7NeUw9m%2Fimage.png?alt=media&#x26;token=b81996c8-998a-414f-af77-56d70b95e52c" alt=""><figcaption></figcaption></figure>
