Hi, I hope someone can help as I can't find anything that covers what I want.
I have a field "Position" (int32) which has 3 incoming options:
Blank, 1,or 2
I would like to convert the digits to words i.e
If Blank="Admin" else
If 1="Adviser" else
If 2="Director"
I am trying to use the Formula tool, but if something else is better please let me know.
Thanks
Solved! Go to Solution.
Below how you can do it
if [Position] = 1
THEN "Adviser"
ELSEIF [Position] = 2
THEN "Director"
ELSE "Admin"
ENDIF
Regards
Hi @Motivator
You can have a reference table and use join tool to map it. I am doing left join to keep all data from left (main data)
Workflow:
Hope this helps : )
Hi, messi007, it doesn't seem to like the second "="?
Hi @Motivator
Seems like position in your data is string. Try this formula
if [Position] = "1"
THEN "Adviser"
ELSEIF [Position] = "2"
THEN "Director"
ELSE "Admin"
ENDIF
Hope this helps : )
Join tool approach is suggested if you have n number of positions 🙂
As I can see position is string field so you have to update the formula:
if [Position] = "1"
THEN "Adviser"
ELSEIF [Position] = "2"
THEN "Director"
ELSE "Admin"
ENDIF
Regards
Hi both of you thanks, yes I can see it was my mistake on the format. Started as int32 but then had previously changed to string.
Thanks to both of you for your quick response.
Happy to help : ) @Motivator
Cheers and have a nice day!