---
title: "PREPEND"
description: "PREPEND"
keywords: "PREPEND"
url: "https://myrapidi.com/wiki/prepend"
locale: "en"
published: "2009-05-15T09:38:32Z"
modified: "2024-05-01T16:15:46Z"
---

# PREPEND(data, substring);

Formula used in e.g. Axapta and XAL to where certain values are prepended with blanks.

&nbsp;

**Example 1:**

> ##PREPEND("NAME",' ',30)
> 
> Will insert blanks in front of the Name until total length is 30.
> 
> If "NAME" has the value "Mr. John Doe" it will return the result " &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mr. John Doe".  
> You can Prepend with any single character you want.
> 
> &nbsp;

**Example 2:**

> ##PREPEND("NAME",'x',30)  
> Will insert x's in front of the Name until total length is 30.
> 
> If "NAME" has the value "Mr. John Doe" it will return the result "xxxxxxxxxxxxxxxxxxMr. John Doe".
