SyntaxColoring.AutoCompleteVariables.SetEnabled
-----------------------------------------------

Sets whether to do auto completion for calculation dialogs.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SyntaxColoring](component_SyntaxColoring.md) | [12.0](newinversion120.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "SyntaxColoring.AutoCompleteVariables.SetEnabled"; Value ) 

**MBS**( **"SyntaxColoring.AutoCompleteVariables.SetEnabled";** /\* Sets whether to do auto completion for calculation dialogs. \*/  
**$Value**) /\* The new setting.  
Pass 1 to enable or 0 to disable.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Value | The new setting.   Pass 1 to enable or 0 to disable. | 1 |

### Result

Returns OK or error.

### Description

Sets whether to do auto completion for calculation dialogs.  
MBS Plugin searches the script upwards for up to 500 lines (see [SyntaxColoring.CheckVariableDeclaration.SetLimits](SyntaxColoringCheckVariableDeclarationSetLimits.md)) to find variable declarations.  
This includes Set Variable script step, various Insert script steps and special comments with @variable, @parameter or @constant prefixes. We then assemble a list of possible variable names to present when you type a $ symbol in your calculation dialog.  
  
Typing an underscore character seems to complete the word right away and may lead to an extra underscore character, which you need to remove manually.  
  
For custom functions or specify output file dialog, you need to manually trigger auto complete. This seems to happen with Option-ESC shortcut on macOS Sonoma and with F5 in older versions (if dictation is off).  
### Examples

Enable it:

 Set Variable \[ $r ; Value: MBS ( "SyntaxColoring.AutoCompleteVariables.SetEnabled"; 1 ) \]  
Disable Auto Complete:

 Set Variable \[ $r ; Value: MBS ( "SyntaxColoring.AutoCompleteVariables.SetEnabled"; 0 ) \]  
### See also

- [SyntaxColoring.AutoCompleteCustomFunctions.SetEnabled](SyntaxColoringAutoCompleteCustomFunctionsSetEnabled.md)
- [SyntaxColoring.AutoCompleteFunctions.SetEnabled](SyntaxColoringAutoCompleteFunctionsSetEnabled.md)
- [SyntaxColoring.AutoCompleteParameters.GetEnabled](SyntaxColoringAutoCompleteParametersGetEnabled.md)
- [SyntaxColoring.AutoCompleteParameters.SetEnabled](SyntaxColoringAutoCompleteParametersSetEnabled.md)
- [SyntaxColoring.AutoCompleteVariables.GetEnabled](SyntaxColoringAutoCompleteVariablesGetEnabled.md)
- [SyntaxColoring.AutoCompleteVariables.GetGlobals](SyntaxColoringAutoCompleteVariablesGetGlobals.md)
- [SyntaxColoring.AutoCompleteVariables.GetLocals](SyntaxColoringAutoCompleteVariablesGetLocals.md)
- [SyntaxColoring.AutoCompleteVariables.SetGlobals](SyntaxColoringAutoCompleteVariablesSetGlobals.md)
- [SyntaxColoring.AutoCompleteVariables.SetLocals](SyntaxColoringAutoCompleteVariablesSetLocals.md)
- [SyntaxColoring.CheckVariableDeclaration.SetLimits](SyntaxColoringCheckVariableDeclarationSetLimits.md)

### Release notes

- **Version 12.0**
    - Added [SyntaxColoring.AutoCompleteVariables.GetEnabled](https://www.mbsplugins.eu/SyntaxColoringAutoCompleteVariablesGetEnabled.shtml) and [SyntaxColoring.AutoCompleteVariables.SetEnabled](https://www.mbsplugins.eu/SyntaxColoringAutoCompleteVariablesSetEnabled.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 11.6pr2](https://www.mbsplugins.de/archive/2021-12-07/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 1st December 2021 , last changed 22nd January 2024

  
[SyntaxColoring.AutoCompleteVariables.GetLocals](SyntaxColoringAutoCompleteVariablesGetLocals.md) - [SyntaxColoring.AutoCompleteVariables.SetGlobals](SyntaxColoringAutoCompleteVariablesSetGlobals.md)

[HTML Version](SyntaxColoringAutoCompleteVariablesSetEnabled.shtml)