Combine two functions CONCAT and LOWER with Substitute

I would like to Concatenate [CustomerID] and [SiteID] in my APP and Lower the letters and user substitute to put everything together without spaces.
The final result would be like: customernorthoffice.

Iโ€™ve tried to combine them all but no luck. Appreciate your help.

0 4 312
4 REPLIES 4

Steve
Platinum 4
Platinum 4

Please post a screenshot of the expression you tried.

Steve
Platinum 4
Platinum 4

For reference:

One step at a time I guess:

SUBSTITUTE(
  LOWER(
    CONCATENATE(
      [CustomerID],
      [SiteID]
    )
  ),
  " ",
  ""
)

OR

LOWER(
  SUBSTITUTE(
    CONCATENATE(
      [CustomerID],
      [SiteID]
    ),
    " ",
    ""
  )
)

OR

SUBSTITUTE(
  CONCATENATE(
    LOWER([CustomerID]),
    LOWER([SiteID])
  ),
  " ",
  ""
)

@areyes You might like the formula I use to generate common sense keys:

substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(

TRIM([ENTER_YOUR_COLUMN_HERE]),

" , ", โ€œ"), ", ", "โ€), " โ€œ, โ€œ"), โ€œ-โ€, "โ€), left(โ€โ€™ โ€œ, 1), โ€œโ€), left(โ€™โ€ ', 1), โ€œโ€), โ€œ/โ€, โ€œโ€), โ€œ.โ€, โ€œ_โ€), โ€œ,โ€, โ€œโ€), โ€œโ€, โ€œโ€), โ€œ:โ€, โ€œโ€), โ€œ;โ€, โ€œโ€), โ€œ[โ€, โ€œโ€), โ€œ]โ€, โ€œโ€), โ€œ(โ€, โ€œโ€), โ€œ)โ€, โ€œโ€), โ€œ{โ€, โ€œโ€), โ€œ}โ€, โ€œโ€), โ€œ!โ€, โ€œโ€), โ€œ@โ€, โ€œโ€), โ€œ#โ€, โ€œโ€), โ€œ$โ€, โ€œโ€), โ€œ%โ€, โ€œโ€), โ€œ^โ€, โ€œโ€), โ€œ&โ€, โ€œโ€), โ€œ*โ€, โ€œโ€), โ€œ+โ€, โ€œโ€), โ€œ?โ€, โ€œโ€), โ€œ|โ€, โ€œโ€), โ€œ<โ€, โ€œโ€), โ€œ>โ€, โ€œโ€)

As you can see itโ€™s a bunch of nested substitutes (to take out all special characters, converting others (like a space) into an underscore โ€œ_โ€).

  • I use this to take data entered by a user (like a company name) and then use THAT as the ID, but I clean things up a bit first.

You can easily convert this to accept two values

substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(

Lower(TRIM(Concatenate([CustomerID], โ€œ_โ€, [SiteID]))),

" , ", โ€œ"), ", ", "โ€), " โ€œ, โ€œ"), โ€œ-โ€, "โ€), left(โ€โ€™ โ€œ, 1), โ€œโ€), left(โ€™โ€ ', 1), โ€œโ€), โ€œ/โ€, โ€œโ€), โ€œ.โ€, โ€œ_โ€), โ€œ,โ€, โ€œโ€), โ€œโ€, โ€œโ€), โ€œ:โ€, โ€œโ€), โ€œ;โ€, โ€œโ€), โ€œ[โ€, โ€œโ€), โ€œ]โ€, โ€œโ€), โ€œ(โ€, โ€œโ€), โ€œ)โ€, โ€œโ€), โ€œ{โ€, โ€œโ€), โ€œ}โ€, โ€œโ€), โ€œ!โ€, โ€œโ€), โ€œ@โ€, โ€œโ€), โ€œ#โ€, โ€œโ€), โ€œ$โ€, โ€œโ€), โ€œ%โ€, โ€œโ€), โ€œ^โ€, โ€œโ€), โ€œ&โ€, โ€œโ€), โ€œ*โ€, โ€œโ€), โ€œ+โ€, โ€œโ€), โ€œ?โ€, โ€œโ€), โ€œ|โ€, โ€œโ€), โ€œ<โ€, โ€œโ€), โ€œ>โ€, โ€œโ€)

Top Labels in this Space