Hi everyone! I need to know how to manipulate text and take everything after the @ of an email. For example, in the database I have a user with a specific email like "someone@somemail.com" I want to take off the "@somemail.com" and just get the "someone" to do a message like "Hello, someone!".

Hi André,

There are several ways to go about this. One simple way is to use an action called String_Split from the Text API

It takes two input parameters, a ‘Text’ and ‘Delimiter’. Just pass the email for the text input and “@“ for the delimiter input and the action will return a Text List. The value you’re looking for will be in row [0] of that list.

Hope this helps!

Regards,

Nordin

Nordin Ahdi wrote:

Hi André,

There are several ways to go about this. One simple way is to use an action called String_Split from the Text API

It takes two input parameters, a ‘Text’ and ‘Delimiter’. Just pass the email for the text input and “@“ for the delimiter input and the action will return a Text List. The value you’re looking for will be in row [0] of that list.

Hope this helps!

Regards,

Nordin

I already used that function but I still have a problem, maybe it's because I'm using the function in the wrong way but instead of returning "someone" the function returns the entire email.

Solution

Hi André Pinto,

I think that something like this will be enough:

Substr(Email,0,Index(Email, "@"))


Solution

Samuel M. wrote:

Hi André Pinto,

I think that something like this will be enough:

Substr(Email,0,Index(Email, "@"))


Thanks! That worked!


Hi André,

My solution does work :). Here's an OML with an example (Traditional Web). It's way more simple then Samuel's solution.

But like I said in my first post, there are several ways to accomplish this.

Regards,

Nordin