# Locking rule

### Why do we need to lock data in reports?

{% hint style="success" %}
In shared or collaborative environments, we need to lock certain fields for editing to maintain data integrity. This feature is essential in preventing accidental edits to critical values. In live financial reporting environments, editing should be disabled on FX rates from source systems, approved budget values, or audited financial results.&#x20;
{% endhint %}

In this section, we'll look at how to configure locking rules.

### 1. Step-by-step guide to setting up field locking rules

**STEP 1:** Navigate to the Insert ribbon > Data Input > Input Rules section and select the type of rule to set up. You can select locking, distribution, or min/max rule types.

<figure><img src="/files/lemu45umgPzwWrl8y2hU" alt=""><figcaption><p>Creating an input rule</p></figcaption></figure>

**STEP 2:** Let's select **Locking Rule** for demonstration purposes. In the Add Rule side pane, we'll change the title to Lock Tax.&#x20;

In the **Apply to** dropdown, let's choose the **Selected Measures** option.&#x20;

<figure><img src="/files/7Hz56DgTN8UScDfZanWt" alt=""><figcaption><p>Assign a title and choose the <strong>Selected Measures</strong> option from the <strong>Apply to</strong> drodown.</p></figcaption></figure>

**STEP 3**: Let's select Tax from the **Choose Measures** dropdown.&#x20;

<figure><img src="/files/anqkh8hDFNbJgo7SOncU" alt=""><figcaption><p>Select the Tax measure from the choose measures dropdown</p></figcaption></figure>

We'll keep the default settings for the other options and click **Create**. Notice how all the Tax measures are locked for editing.

<figure><img src="/files/VC58acLjkqgC9Hy0u8LZ" alt=""><figcaption></figcaption></figure>

### 2. Configuration options for locking rules

Basic configurations are covered in the [Data validation rules](/working-with-inforiver/4.-adding-business-logic-and-formulae/data-validation-rules.md) section. The options specific to locking rules are covered in this section.

#### **2.1. Lock open forecast periods**

If you've created a forecast in Inforiver, future time ranges will be open for editing, and forecasts for closed periods or past dates cannot be edited. [Learn more about forecasting](/working-with-inforiver/7.-planning-budgeting-and-forecasting/forecasting-writeback-matrix.md).

In this use case, we've created a forecast for 2026. When the forecast is created, edits are automatically disabled on the forecast measure until 2025 - which is the closed period.

<figure><img src="/files/dKNituaB7X8kIbTb4DRi" alt=""><figcaption><p>Open forecasts are editable by default</p></figcaption></figure>

Select the **Open Period** option to disable editing on open forecasts or future time frames as well. Notice how the 2026 forecast columns are greyed out and cannot be modified.

<figure><img src="/files/6IM8AZgI2YVrh5GeKv62" alt=""><figcaption><p>Disable editing on open forecasts</p></figcaption></figure>


---

# 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://docs.inforiver.com/working-with-inforiver/4.-adding-business-logic-and-formulae/data-validation-rules/locking-rule.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.
