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

# Status Field

> Status Field allows to showing of a color indicator status

Status Field allows to showing of a color indicator status

You can configure this in two ways

1. Using code property in the generator
2. Using the Value property in the generator

### Using the Code property

You can set the code (path) to get the color from any property of the form context, only make sure this returns a valid color

### Using the Value property

Here you can write your custom code to return the color (or color and text) depending on some conditions, for instance, you can write the next code:

#### Return Color and Text

```javascript theme={null}
let color = 'green';
let text = 'Activo';

if(context?.featureContext?.Clasificacion === 'Inactivo'){
    color = 'red';
    text = 'Inactivo';
}

const result = {color, text};

result;
```

<figure><img src="https://mintcdn.com/codenull/fUND-Qmj85v5Oam-/images/mvkzJcT9kIqq1B4z5Eti.png?fit=max&auto=format&n=fUND-Qmj85v5Oam-&q=85&s=a17aca9c15da6659036eac2afcbf8134" alt="" width="221" height="45" data-path="images/mvkzJcT9kIqq1B4z5Eti.png" /><figcaption><p>Result returning color and text</p></figcaption></figure>

#### Return only color

You can only return a string with a valid color in case you do not want to have a text alongside the indicator

```javascript theme={null}
let color = 'green';

if(context?.featureContext?.Clasificacion === 'Inactivo'){
    color = 'red';
}

color;
```
