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

# Supported What-If Table Context Menu

## Overview

| Plugin key | BAS Setting key |
| - | - |
| `accelerator_plugin-supported-what-if` | `bas-plugin-menu-item-supported-what-if` |

This plugin allows you to perform a what-if simulation to display instant recalculations and incremental impact on a given measure for a predefined set of levels. To use this feature, right-click on a measure and select the **What-If** option from the context menu. The options you can select are determined by the configuration on the server. This will open a dialog box where you can enter your inputs to execute the simulation.

<Frame>
  <img
    src="https://mintcdn.com/activeviam/rjtO5wfdrd2GJtpi/solutions/libraries/ui-components/5.2.26/images/supported-whatif-context-menu.png?fit=max&auto=format&n=rjtO5wfdrd2GJtpi&q=85&s=02004d4f5e08cba2c73df9d57c5a3756"
    alt="Supported what-if context
menu"
    width="2266"
    height="1398"
    data-path="solutions/libraries/ui-components/5.2.26/images/supported-whatif-context-menu.png"
  />
</Frame>

<Frame>
  <img src="https://mintcdn.com/activeviam/rjtO5wfdrd2GJtpi/solutions/libraries/ui-components/5.2.26/images/supported-whatif-modal.png?fit=max&auto=format&n=rjtO5wfdrd2GJtpi&q=85&s=7bc90b0f42f3ebb01e27cc05183bd525" alt="Supported what-if modal" width="964" height="926" data-path="solutions/libraries/ui-components/5.2.26/images/supported-whatif-modal.png" />
</Frame>

## Availability

| Solution | Enabled |
| - | - |
| FRTB | ❌ |
| Market risk | ✅ |
| SIMM | ❌ |
| CVARC | ❌ |
| Limits | ❌ |
| Sign-off | ❌ |

## Settings

None: an empty object signals that the widget is enabled for the given server.

## How to disable it

### Disable universally

To disable this feature for all solutions, add this line at the end of your extension’s `activate` function to unregister the plugin:

```diff theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
const extension: ExtensionModule = {
  activate: async (configuration: Configuration) => {
    ...
+    delete configuration.pluginRegistry["menu-item"]["accelerator_plugin-supported-what-if"];
+    Object.values(configuration.pluginRegistry["widget"]).forEach(widgetPlugin => {
+        widgetPlugin.contextMenuItems = widgetPlugin.contextMenuItems.filter( menuItem => menuItem.key !== "accelerator_plugin-supported-what-if")
+    })
  }
}
```

### Disable for specific servers

To disable this feature for a given server, you must delete this feature’s settings for that server key by altering the `basSettings` parameter before calling the `activate` function.

**Example**
Disabling this feature for the `MR` server only:

```diff theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
+ import {produce} from "immer";
- import {activate as activateMr} from "@activeviam/mr-sdk";
+ import {activate as activateMr, basSettings as mrBASSettings} from "@activeviam/mr-sdk";
 import {activate as activateFrtb} from "@activeviam/frtb-sdk";

 const extension: ExtensionModule = {
  activate: async (configuration: Configuration) => {
    ...
+    const mrBASSettingsWithFeatureDisabled = produce(mrBASSettings, draft => {
+      delete draft["MR"]["bas-plugin-menu-item-supported-what-if"];
+    });

-   activateMr({configuration});
+   activateMr({configuration, basSetttings: mrBASSettingsWithFeatureDisabled})
    activateFrtb({configuration});
  }
}
```
