Adding new calculation field with ifelse

Hello, I’m trying to use ifelse statement to create new calculation field. I want to fix some missmatch value in my field tag_ownerteam. I try this formula, it shows an error, but its not showing what is the error.

ifelse(
{tag_ownerteam} = ‘MySiloam’, ‘mysiloam’,
{tag_ownerteam} = ‘mysiloam-pas’, ‘mysiloam’,
{tag_ownerteam} = ‘Kairos’, ‘kairos’,
{tag_ownerteam} = ‘KAIROS’, ‘kairos’,
{tag_ownerteam} = ‘HOPE’, ‘hope’,
{tag_ownerteam} = ‘HOPE Team’, ‘hope’,
{tag_ownerteam} = ‘Hope’, ‘hope’,
{tag_ownerteam} = ‘EMR’, ‘emr’,
{tag_ownerteam} = ‘EMR Team’, ‘emr’,
{tag_ownerteam} – Keep original value if no match
)
In the field tag_ownerteam there is a null value data. Does it will affect my formula?

Thank you guys!

Hi @alwanabdrhmn

From the screenshot it appears your comments are not recognized. Try putting the comments on a separate row before your last row.

You should see the comments highlighted in green

Regards,
Giri

Hi @alwanabdrhmn,
It’s been awhile since we last heard from you, did you have any additional questions regarding your initial post?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

Hi @alwanabdrhmn,
Since we have not heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

One quick note to add, make sure to follow the format for the ifelse statement. After you input all of your custom values that you’d like to replace with, your last option should just be a comma and then what you’d like to return:

ifelse(
{tag_ownerteam} = 'MySiloam', 'mysiloam', 
{tag_ownerteam} = 'mysiloam-pas', 'mysiloam',
{tag_ownerteam} = 'Kairos', 'kairos',
{tag_ownerteam} = 'KAIROS', 'kairos',
{tag_ownerteam} = 'HOPE', 'hope',
{tag_ownerteam} = 'HOPE Team', 'hope',
{tag_ownerteam} = 'Hope', 'hope',
{tag_ownerteam} = 'EMR', 'emr',
{tag_ownerteam} = 'EMR Team', 'emr',
{tag_ownerteam})

This will check for those values, if there, then they will be replaced, and if not, then it will return the actual value within {tag_ownerteam}.

Thank you!