# Active item & hidden expressions

![](https://s3.amazonaws.com/helpscout.net/docs/assets/60208fd212248b2c96d50eeb/images/627ddff1c01fce37d9b12de3/file-p8DLuX2dYA.png)

The following behaviour is produced in each expression:

* **Active Item Expression** - if the result is true, the item will be active in the form and submits data. If the result is false, the item will not be active and will not submit data.
* **Hidden Expression** - if the result is true, the item will be hidden in the form, but still remains active and submits data. If the result is false, the item will be visible in the form, remains active and submits data.

### Active Item Expression

Let's look at an example for Active Item Expression. I have an element I only want visible when I am fitting screw caps to my bottles. I will use an attribute called **Machine Rate**, which is a number string attribute. I choose this attribute by clicking on it in from the **Attributes panel.**

I then added the expression '== 2' to check whether Machine Rate value is 2. Since it is, the form preview calculation resulted in **true**.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-cb99165214002109850bb07da1c09ab375b964be%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

In the above example, since the evaluation resulted to **true**, the item it applies to is active:

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-fd957f173cb450b8a03b40340e9220110ad83593%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

However, if it was **false**, the item's value will not be submitted, shown below

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-6271dbd8ed5e35b7e734602922f43fc5a86b5aaf%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Hidden Expression

We apply the same approach to Hidden Expressions. The only difference is that Hidden Expressions do not change if the item is active; **only whether it is visible if the expression is true.**

In the following example, we want to hide an element that does not need the operator's response, but we do still want the data recorded.

Below is an example using a Data Entry, Evaluate String item to display a description.

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-c57bcb9028dadb0d8463a857ef2c76cca77a6c42%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

This calculation results in a sentence constructed of hard-coded text, the value of another element in the activity ( *Bottle Colour*) and 2 attributes (*Closure type* and *Machine model*). If visible, the operator would see this result:

![](https://s3.amazonaws.com/helpscout.net/docs/assets/60208fd212248b2c96d50eeb/images/627de0e58bf21a2e2b6d3ca8/file-odG0M2KYSU.png)

This element isn't relevant to the operator, but the data does need to be captured. To make sure this element is hidden at all times, we add the following calculation to the Hidden Expression:

<figure><img src="https://352909507-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNT40XJFAFlAhUX8CcQS%2Fuploads%2Fgit-blob-3cc3d91fb4d505ea61fdccda9cd6de4212a041d3%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Here, we are using the element's own Item Key to say; if the value of this is null OR is not null, then make this element hidden.

This is likely to be your most common calculation for Hidden Expression as it will guarantee that the item is always hidden.

In this screenshot, you can see that item is hidden, but in the following screenshot, you can see that the data from it was still submitted

![](https://s3.amazonaws.com/helpscout.net/docs/assets/60208fd212248b2c96d50eeb/images/627de11c68d51e7794440113/file-VWmibzZ7iK.png)

![](https://s3.amazonaws.com/helpscout.net/docs/assets/60208fd212248b2c96d50eeb/images/627de169b2de5178f88835e6/file-o5tVoWwfaQ.png)
