Help

How to combine fields based on the value of another field ?

Topic Labels: Formulas
Solved
Jump to Solution
1853 2
cancel
Showing results for 
Search instead for 
Did you mean: 
micha281sth
6 - Interface Innovator
6 - Interface Innovator

Hello, I am looking for a way to combine five fields (address, second address line, zip code and city) to a new multiline text field when another field "second zip code" has a value. 

So here is an example of the five fields: 

  • Address: 220 Miller Avenue
  • Second Address line: Apartement 50
  • Zip Code: 22033
  • City: Paris
  • Country: France

This values should be combined to the multiline text field "complete address" (with a line break "\n" after each line, except between the zip code and city): 
220 Miller Avenue
Apartement 50
22033 Paris
France

But the six fields should only be combined if the field "second zip code" has a value (i.e. 22033). 

Is this possible somehow with a formula field?

Thanks for help, 
Michael

1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

Yes this is possible. There are many possible ways. Here is one.

IF(
  {second zip code},
  CONCATENATE(
    {Address} & "\n",
    IF({Second Address line}, {Second Address line} & "\n"),
    {Zip Code} & " " & {City} & "\n",
    {Country}
  )
)

  

See Solution in Thread

2 Replies 2
kuovonne
18 - Pluto
18 - Pluto

Yes this is possible. There are many possible ways. Here is one.

IF(
  {second zip code},
  CONCATENATE(
    {Address} & "\n",
    IF({Second Address line}, {Second Address line} & "\n"),
    {Zip Code} & " " & {City} & "\n",
    {Country}
  )
)

  

Thanks @kuovonne , works perfectly 😀