More than 3 argument If condition, eg: if, elseif, elseif, else...

New Altair Community Member
Updated by Jocelyn
How can I have more than 3 arguments in an if condition when trying to generate a new attribute "Generate Attribute" operator?
Such as:
or if(Age < 2, "Baby" || Age < 12, "Child" || Age < 19, "Teen" || Age < 30, "Adult" || Age <= 65, "Adult" || Age > 65, "Senior")
For a new column name "AgeGroup" based on an existing Attribute "Age" which just has numerical integer values of instances (people's) age...
I'd rather have everything in one Operator, or use the least amount of operators possible to keep things clean!
Such as:
if(Age < 2, "Baby" || Age < 12, "Child")
&& if(Age < 19, "Teen" || Age < 30, "Adult")
&& if(Age <= 65, "Adult" || Age > 65, "Senior")
or if(Age < 2, "Baby" || Age < 12, "Child" || Age < 19, "Teen" || Age < 30, "Adult" || Age <= 65, "Adult" || Age > 65, "Senior")
For a new column name "AgeGroup" based on an existing Attribute "Age" which just has numerical integer values of instances (people's) age...
I'd rather have everything in one Operator, or use the least amount of operators possible to keep things clean!