EnvironmentVariables.Name
-------------------------

Queries name of environment variable with given index.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [EnvironmentVariables](component_EnvironmentVariables.md) | [5.1](newinversion51.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "EnvironmentVariables.Name"; Index ) 

**MBS**( **"EnvironmentVariables.Name";** /\* Queries name of environment variable with given index. \*/  
**$Index**) /\* The zero based index of the environment variable in range 0 to [EnvironmentVariables.Count](EnvironmentVariablesCount.md)-1.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Index | The zero based index of the environment variable in range 0 to [EnvironmentVariables.Count](EnvironmentVariablesCount.md)-1. | 0 |

### Result

Returns text or error.

### Description

Queries name of environment variable with given index.  
### Examples

Query name of first variable:

 Set Variable \[$name ; Value:MBS ("EnvironmentVariables.Name"; 0)\]  
### See also

- [EnvironmentVariables.Count](EnvironmentVariablesCount.md)
- [EnvironmentVariables.JSON](EnvironmentVariablesJSON.md)
- [EnvironmentVariables.Names](EnvironmentVariablesNames.md)
- [EnvironmentVariables.SetValue](EnvironmentVariablesSetValue.md)
- [EnvironmentVariables.Value](EnvironmentVariablesValue.md)

### Release notes

- **Version 8.0**
    - Fixed [EnvironmentVariables.Names](http://www.mbsplugins.eu/EnvironmentVariablesNames.shtml) to not crash on Linux.

### Example Databases

- [Utility functions/Environment Variables](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Utility%20functions/Environment%20Variables.shtml#1ScriptAnchor_)

This function is free to use.

Created 8th April 2015 , last changed 8th April 2015

  
[EnvironmentVariables.JSON](EnvironmentVariablesJSON.md) - [EnvironmentVariables.Names](EnvironmentVariablesNames.md)

[HTML Version](EnvironmentVariablesName.shtml)