Extract substring using other fields as parameters

  • 5 October 2020
  • 4 replies

Userlevel 3
Badge +1

Hello, I need to create a field that has the Email Domain for a person record, so if their email address is, then the email domain would be “”.


I’ve tried doing it with Substring() via a calculated field and also a rule. I tried in a rule to do the transform task to get the position first and then added another transform task to use the position in a substring function, but it wouldn’t take a fieldname. It seems like it requires a hard coded number, so instead of being able to do something like substring(email address, @position, length), it seems that it wants something like substring(email address, 4, 10).

Is there any way for me to do this in Gainsight?



Best answer by jean.nairon 5 October 2020, 18:14

View original

4 replies

Userlevel 6
Badge +4

Hi @tammy_c

I think you’re on the right track but I would recommend using the Right formula. It allows you to grab all the characters on the right up to a certain field. 


RIGHT(field, substring): extracts the right part of the string with the appearance of a string character. For example, RIGHT(, @) will return “” as the output.


Here’s the rest of the support article to help you out: 


Hope this helps!

Userlevel 3
Badge +1

Hi @jean.nairon 

That worked! Thanks! I think I had looked at right() in the formula field on the object and there it’s asking for a number, so I didn’t catch that right() in rules is looking for the substring.


Thanks again!

Userlevel 6
Badge +4

You’re welcome @tammy_c. Glad I was able to help!!

Userlevel 7
Badge +2

Thanks for the assist here @jean.nairon !