Skip to main content
Solved

Create a slug from 2 items

  • March 12, 2021
  • 3 replies
  • 31 views

Hi,

I am using a formula to create a slug: SUBSTITUTE({Job Title}," “,”-")
However, is it possible to add another item in the formula, such as {location}?

Many Thanks,
Hannah

Best answer by kuovonne

Just use an ampersand:

SUBSTITUTE({Job Title}," ","-") & " " & {Location Field}


If you want the location as part of the slug, you need to include it inside the SUBSTITUTE

SUBSTITUTE(
  {Job Title} & "-" & {Location Field},
  " ",
  "-"
)

You may also need multiple nested SUBSTITUTE functions to replace other characters that are not allowed in slugs.

3 replies

ScottWorld
Forum|alt.badge.img+35
  • Genius
  • March 12, 2021

Just use an ampersand:

SUBSTITUTE({Job Title}," ","-") & " " & {Location Field}


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • Answer
  • March 12, 2021

Just use an ampersand:

SUBSTITUTE({Job Title}," ","-") & " " & {Location Field}


If you want the location as part of the slug, you need to include it inside the SUBSTITUTE

SUBSTITUTE(
  {Job Title} & "-" & {Location Field},
  " ",
  "-"
)

You may also need multiple nested SUBSTITUTE functions to replace other characters that are not allowed in slugs.


  • Author
  • New Participant
  • March 12, 2021

If you want the location as part of the slug, you need to include it inside the SUBSTITUTE

SUBSTITUTE(
  {Job Title} & "-" & {Location Field},
  " ",
  "-"
)

You may also need multiple nested SUBSTITUTE functions to replace other characters that are not allowed in slugs.


That’s great, thank you!