> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# On Field Control Deactivate

> On Field Control Deactivate runs before a FlexiCapture field loses focus and lets your script change which field becomes active next via NewActiveControl.

## When it is launched

The script is launched before a field stops being active.

The field that is going to be activated next is passed to the script as an input parameter. This parameter can be changed.

## Parameters

<table width="100%"><thead><tr><th><p><strong>Name</strong></p></th><th><p><strong>Type</strong></p></th><th><p><strong>Access</strong></p></th><th><p><strong>Description</strong></p></th></tr></thead><tbody><tr><td><p>Context</p></td><td><p><a href="/flexi-capture/appendix/scripts-shell/ifieldcontrol">IFieldControl</a></p></td><td><p>Read/write</p></td><td><p>The field being deactivated</p></td></tr><tr><td><p>NewActiveControl</p></td><td><p><a href="/flexi-capture/appendix/scripts-shell/iboxedfieldcontrol">IBoxedFieldControl</a></p></td><td><p>Read/write</p></td><td><p>The field being activated.</p><p><strong>Note: </strong> The property has null value if the field that is going to be activated belongs to another document.</p></td></tr><tr><td><p>WasModified</p></td><td><p>bool</p></td><td><p>Read/write</p></td><td><p>Specifies whether the field was modified</p></td></tr></tbody></table>
