Skip to main content
Solved

Remove Characters after comma for string fields

  • December 8, 2022
  • 4 replies
  • 104 views

Forum|alt.badge.img+3

Hello Airtable world,

I need help with a formula. I have a look up field with many options. All of these options share the same data for some field e.g. Pick Up Location.

In this case, I have 1 record with 2 options (lookup field) and the look up field extracts: Montreal, Montreal.

Is there a formula I can use to only keep what is before the first comma when working strings

This is an example of what I am trying to achieve

Thank you in advance

Matt

 

Best answer by TheTimeSavingCo

Hm, not sure what your data setup's like, but maybe you could look into using a rollup field with the formula `ARRAYUNIQUE(values)` as well

4 replies

TheTimeSavingCo
Forum|alt.badge.img+31

Hm, not sure what your data setup's like, but maybe you could look into using a rollup field with the formula `ARRAYUNIQUE(values)` as well


Forum|alt.badge.img+18
  • Inspiring
  • December 9, 2022

Something along the lines (untested)...

IF(FIND(',',{field name}&''), 
LEFT(FIND(',',{field name}&'')-1,{field name}&''),
{field name}&''
)

 


Forum|alt.badge.img+3
  • Author
  • New Participant
  • December 11, 2022

Something along the lines (untested)...

IF(FIND(',',{field name}&''), 
LEFT(FIND(',',{field name}&'')-1,{field name}&''),
{field name}&''
)

 


well that works just fine, thanks a lot!


Forum|alt.badge.img+2
  • New Participant
  • November 19, 2024

Something along the lines (untested)...

IF(FIND(',',{field name}&''), 
LEFT(FIND(',',{field name}&'')-1,{field name}&''),
{field name}&''
)

 


Can you help me do the same for Los Angeles (hollywood)? I need to remove everything including and after the "(" in "(hollywood)"

So my goal is to make Los Angeles (hollywood) --> Los Angeles