# Update

## Optimistic concurrency control

IFS is built to detect if entity has been updated between the time the Flow app has retrieved the data until it's being updated, change tracking. In pre-cloud IFS, developers returned objversion and objid values in modify PL/SQL calls for this purpose.&#x20;

In OData calls same check **can** be enforced using entity specific ETag in request headers if-match attribute upon Update operation.  [ETag](/flow-ifs-cloud-development-guidelines/getting-started/terminology.md#etag) value of an entity can only be retrieved by using "Get by key" -operation prior Update operation.&#x20;

<figure><img src="/files/F7BYdQMdkdKbs1wmO8Ee" alt=""><figcaption><p>ETag location in response in Get by key -operation</p></figcaption></figure>

{% hint style="info" %}
The **ETag** value returned by IFS is a base64 encoded value of the combination of *objid:objversion.* &#x20;
{% endhint %}

In case you encounter [ODP\_MISSING\_PRECONDITION](/flow-ifs-cloud-development-guidelines/flow-development-with-odata/implementation/response-status-handling/errors-from-ifs.md#odp_missing_precondition) -error In Update operations, provide the **if-match** header attribute. By providing the ETag as if-match attribute value; IFS will check that entity has not been updated between your clients "Get by key" request and Update operation.

<figure><img src="/files/5D4MHIwOrpP7XQUQbfx4" alt=""><figcaption><p>Using ETag in if-match header attribute</p></figcaption></figure>

{% hint style="info" %}
**Providing if-match attribute with value \*, IFS will dismiss the optimistic concurrency control.**&#x20;
{% endhint %}

<figure><img src="/files/gdaKXTi295RmsCPEj7WB" alt=""><figcaption></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.novacura.com/flow-ifs-cloud-development-guidelines/flow-development-with-odata/implementation/operation-specific-notes/update.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.
