Skip to main content
Event References in SEL

Learn how to reference other events within SEL formulas.

Updated over a week ago

What is an Event Reference?

Sometimes you need to pull the value of one event into another event's SEL formula or expression. This is called an event reference and looks similar to a worksheet reference in a spreadsheet. When using an event reference, the internal value in the current period for the referenced event will be added to your formula's result.

How do I create an Event Reference?

To create an event reference in an event's formula or expression, you will use the reference event's title, prefixed with an exclamation point, and wrapped by single tick marks '. For example, an event called "Other Expenses" can be referenced in all of the following ways:

  • =!'Other Expenses'

  • =!'Other Expenses' + 10k

  • + !'Other Expenses'

πŸ”” Notes:

  • Since event references rely on event titles, you will run into issues if you give multiple events the same title. Make your event titles unique!

  • An event reference does not automatically include a recurring pattern, so make sure you select a recurring pattern if you'd like to reference values in subsequent periods for a recurring event.

  • Event references trigger AFTER the referenced event, so values may start to appear in a period later than expected. For example, if a monthly recurring event starts in January, a monthly event reference will see its value first appear in February. To ensure both values appear in the same period, select the End of Month recurring pattern for the event reference. Alternatively, you can use a custom recurring pattern to have the event reference trigger in the minute immediately following the referenced event, like so: 1 8 1 * *. This ensures both events trigger on the same day in quick succession.

Generators & Containers

You can also use event references as the initial values for the construction of a function, like a generator or a container. For example:

  • =Source(!'Developer Salary')

  • =Funnel(!'Initial Deposit', !'Spending Rate')

πŸ”” Note: Unlike formulas, when calling a generator or container, the values from the reference will only be used to initialize the new event. Once the event is initialized, the reference values then dissolve and the generator / container runs as written, without calling the reference event.


Did this answer your question?