---
title: "Tag Expressions"
canonical: "https://docs.rubiconwater.com/space/DC/2048721108/Tag%20Expressions"
format: markdown
---
> Macro (toc)

# What is a Tag Expression?

A tag expression is a set of statements that are evaluated to return a tag value. The statements are evaluated in sequence until a value is returned after which no further statements are evaluated.

See the <u>[Tag Expression Example](https://rubiconwater.atlassian.net/wiki/spaces/DCNC/pages/2048721148)</u> for a worked example of a tag expression.

Create a tag expression if you want to calculate the value of a tag from an expression that includes mathematical operations, the values of other tags, or the value of object attributes. Tag expressions are created with the Tag Expression Editor.

> ℹ️ **Note: Legacy tag expressions**
> ℹ️ 
> ℹ️ The Tag Expression Editor was introduced in 2019. The syntax of tag expressions has not changed. Tag expressions created before 2019 will still work and can be edited in the Tag Expression Editor.

# Identifying Tags that use Tag Expressions

Tags that use a tag expression are highlighted in yellow.

# Shared Expressions

Some tags use *Shared Expressions*. That is, the same expression is used by different tags. These are usually created by Rubicon's host engineering team when creating multiple sites with tags requiring the same tag expressions. You can recognize a tag with a shared expression because it will be highlighted in green on the tag table in the Data Sources module.

> ℹ️ **Caution**
> ℹ️ 
> ℹ️ If you edit a shared expression, any change will affect all the tags that share the expression. Contact Rubicon Support if you need to change the expression for one of these tags.

---