You need to first store the selected age into a variable before you use it for comparison. Like so:
output
City: [city], Gender: [gender], Age: [a = age.selectOne] [agenum], Occupation: [occupation]
city
Aldebaran
Karus
Polaris
Sirius
Vega
gender
Male
Female
Non-binary^0.1
agenum
{0-5} ^[a == "Baby"]
{6-15} ^[a == "Kid"]
{16-20} ^[a == "Teen"]
{22-55} ^[a == "Adult"]
{56-100}^[a == "Elder"]
age
Baby
Kid
Teen
Adult
Elder
occupation
Too Young ^[a == "Baby"]
Student ^[a == "Kid"]
Apprentice ^[a == "Teen"]
[job] ^[a == "Adult"]
Retired ^[a == "Elder"]
The ^[a == "Baby"] syntax is called Dynamic Odds, which is better for multiple if elses/ternary.
