• Resolved dcurran

    (@dcurran)


    Is there a way to remove all the characters after a specific character in a field? Or only take the value before a character? For example the input is “johnsmith@email.com” what I’d like included in the calculation is only “johnsmith” and disregard everything after the “@” character.

    Thank you very much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @dcurran

    There are multiple alternatives to get a substring, but the simplest one, in this case, is using the split method:

    'johnsmith@email.com'.split('@')[0]

    Or if the email field is the fieldname1, the equation would be:

    fieldname1.split('@')[0]

    Best regards.

    Thread Starter dcurran

    (@dcurran)

    This worked perfectly. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Remove values before or after a character’ is closed to new replies.