# Creating / formatting address

**URL:** <https://community.noloco.io/t/creating-formatting-address/778>\
**Category:** Ask for Help\
**Created:** [June 3, 2024, 8:51am UTC](https://community.noloco.io/t/creating-formatting-address/778 "2024-06-03T08:51:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aferguson024](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@aferguson024](https://community.noloco.io/u/aferguson024)\
**Post date:** [June 3, 2024, 8:51am UTC](https://community.noloco.io/t/creating-formatting-address/778/1 "2024-06-03T08:51:23Z")

</div>

Hi there

We have a PostgreSQL database synchronised. For a specific table, address data is imported as text in different columns - i.e. Address Line 1, Address Line 2 etc.

Is there a way to transpose this into the ‘Street Address’ column in Noloco?

If not, is there a way to concatenate this display into a friendly display format (e.g. using Formulas), but where lines are only included if data exists. For example, Address Line 2 is an optional field - if we bring the data together we want to avoid blank lines and unnecessary separators where Address Line 2 is not supplied.

---

<div class="post-metadata">

**Author:** ![darragh](https://dub1.discourse-cdn.com/flex005/user_avatar/community.noloco.io/darragh/32/12_2.png) [@darragh](https://community.noloco.io/u/darragh)\
**Post date:** [June 3, 2024, 8:56am UTC](https://community.noloco.io/t/creating-formatting-address/778/2 "2024-06-03T08:56:23Z")

</div>

> [@aferguson024](#):
>
> If not, is there a way to concatenate this display into a friendly display format (e.g. using Formulas), but where lines are only included if data exists. For example, Address Line 2 is an optional field - if we bring the data together we want to avoid blank lines and unnecessary separators where Address Line 2 is not supplied.

Hey @aferguson024 👋 Great question, and welcome to the community!

There’s no way to transpose different fields into one address field, however it would be possible to combine them using a formula.

Checkout the examples we have in our [Formula Guides](https://guides.noloco.io/data/collections/formulas#examples)

This example formats a full name with a space between first name and last name, if either first name or last name are not empty.

```auto
{first name} & 
IF(
 OR(
  ISBLANK({first name}),
  ISBLANK({last name})
 ),
 "",
 " "
) & 
{last name}

```

You could do something very similar with newlines for an address. To add a line, you just need to press enter on the keyboard so it would look something like this.

```auto
{line 1} &
ISEMPTY({line 1}, "", "
")

```

See how the last set of quotes enclose a newline

---

<div class="post-metadata">

**Author:** ![aferguson024](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@aferguson024](https://community.noloco.io/u/aferguson024)\
**Post date:** [June 3, 2024, 9:59am UTC](https://community.noloco.io/t/creating-formatting-address/778/3 "2024-06-03T09:59:09Z")

</div>

> [@darragh](#):
>
> ```auto
> {line 1} &
> ISEMPTY({line 1}, "", "
> ")
> 
> ```

Thanks for this, but not quite getting there.

I’ve tried the following:

Add Line 1

& ISBLANK(  
Add Line 2

, ", ", “”)  
&  
Add Line 2

&  
ISBLANK(  
Town

, ", ", “”)  
&  
Town

&  
ISBLANK(  
County

, ", ", “”)  
&  
County

& ISBLANK(  
Postcode

, ", ", “”)  
&  
Postcode

Field names are entered correctly within Noloco (used the selector), but the output I get is:

2 Kingsley RoadTRUEFALSEFrodshamFALSECheshireFALSEWA6 6AP

I also tried ISEMPTY and the formula didn’t work at all.

FYI I don’t think ISBLANK or ISEMPTY are documented in your Help Guide, I can see the name example but not explanation of the function / arguments.

---

<div class="post-metadata">

**Author:** ![darragh](https://dub1.discourse-cdn.com/flex005/user_avatar/community.noloco.io/darragh/32/12_2.png) [@darragh](https://community.noloco.io/u/darragh)\
**Post date:** [June 3, 2024, 10:09am UTC](https://community.noloco.io/t/creating-formatting-address/778/4 "2024-06-03T10:09:12Z")

</div>

You need to wrap your `ISBLANK` in an `IF` what’s happening now is that your `ISBLANK` is outputting `TRUE` or `FALSE` so you need to wrap that in an

```auto
IF(ISBLANK({value), "", "
")

```

---

<div class="post-metadata">

**Author:** ![aferguson024](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@aferguson024](https://community.noloco.io/u/aferguson024)\
**Post date:** [June 3, 2024, 11:42am UTC](https://community.noloco.io/t/creating-formatting-address/778/5 "2024-06-03T11:42:58Z")

</div>

That’s worked, thank you!
