Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Alteryx is here to help you solve your biggest data challenges. Read about the new Virtual Solution Center here.

How I can change the field value based on the second field

Highlighted
5 - Atom

Hi!

 

I have the problem the change the field value based on the second field. Could anybody help me?

I tried next formula, but I get the Title field to 0

 

IF [Name] = "Norman" THEN [Title] = "Nurse"
ELSEIF [Name] = "Damien" THEN [Title] = "Doctor"
ELSEIF [Name] = "Kaarin" THEN [Title] = "Assistent"

ELSE [Nimike]
ENDIF

Highlighted
5 - Atom

There were mistake, but it's not reason. IT was only translation error.

 

IF [Name] = "Norman" THEN [Title] = "Nurse"
ELSEIF [Name] = "Damien" THEN [Title] = "Doctor"
ELSEIF [Name] = "Kaarin" THEN [Title] = "Assistent"

ELSE [Title]
ENDIF

Alteryx Certified Partner

Hi @Ninjago,

 

Select the field you want to update or create one then writes as follows:

 

IF [Name] = "Norman" THEN "Nurse"
ELSEIF [Name] = "Damien" THEN "Doctor"
ELSEIF [Name] = "Kaarin" THEN "Assistent"

ELSE "[Title]"   // or whatever vale you want to pass.
ENDIF

 

Thanks,

Vishwa

 

 

 

 

Highlighted
5 - Atom

Thanks this works:

IF [Name] = "Norman" THEN "Nurse"
ELSEIF [Name] = "Damien" THEN "Doctor"
ELSEIF [Name] = "Kaarin" THEN "Assistent"

ELSE [Title]
ENDIF

Labels