---
title: "BEFORE"
description: "BEFORE"
keywords: "BEFORE SUBSTRACT TRIMm"
url: "https://myrapidi.com/wiki/before"
locale: "en"
published: "2009-05-14T08:48:01Z"
modified: "2024-09-27T15:00:47Z"
---

# BEFORE(data,substring);

Using this function, the data before the specified substring will be returned. The result is returned as a text.

&nbsp;

**Examples:**

We have a field called " **Company Name**" with the value ' **Rapidi A/S**'  
  
`##BEFORE("Company Name", ' ')`  
  
The formula will return ' **Rapidi**'.  
  
`##BEFORE("Company Name", 'Rapidi')`  
The formula will return **NULL** because there is no value before 'Rapidi'.  
  
`##BEFORE("Company Name", 'A/S')`  
  
The formula will return ' **Rapidi**' with a blank at the end.   
  
`##DBLOOKUP('DESTDS','Account','Customer_No__c',`**`BEFORE("DimensionDisplayValue",'-')`**`,'Id'))`  
  
The nested formula will retrieve the value that is stored before the first minus sign **-** in the field ' **DimensionDisplayValue**'. If the vale retrieved equals **Customer\_No\_\_c** , then the ID will be retrieved. &nbsp;
