Tools "Set Variable" if() formula always returns first condition regardless of input value

:bullseye: What is your goal?

I want a Tools “Set Variable” module to evaluate why someone was disqualified from a Tally form and save the correct reason to Airtable. There are 4 possible reasons: Under 18, Over 65, Not English comfortable, Not available.

:thinking: What is the problem & what have you tried?

The Tally Age field comes through as an array (Age). No matter what the person selected, the variable always outputs “Under 18” or empty — never the correct reason.
I have tried:

first() typed manually
first() inserted from the array functions panel
contains() from the array functions panel
Direct comparison with no wrapper

Current formula:
if(first(Age) = “1–17”; Under 18; if(first(Age) = “66+”; Over 65; if(first(English) = “No”; Not English comfortable; Not available)))
When I run the scenario and click the Tools module bubble, it shows Variable value: empty.

:clipboard: Error messages or input/output bundles

No error shown — scenario runs green
Tools module OUTPUT shows: DisqualifyReason: empty
Airtable confirms Age field value is exactly 66+ for test records

:link: Create public scenario page

Hey there,

I don’t see a module with such a formula in the scenario you shared. Can you show a screenshot and copy/paste the formula using the code formatting option so it gets preserved?

image

The output values need to be wrapped in quotes because without them, Make treats these as undefined variables and returns empty.

Try doing this:

if(first(Age) = “1-17”; “Under 18”; if(first(Age) = “66+”; “Over 65”;

if(first(English) = “No”; “Not English comfortable”; “Not available”)))

If there are still empty returns after that, the next thing to do is to check whether the dash in “1-17” is an en dash (–) as opposed to a regular hyphen(-).

Tally sometimes outputs special characters that look identical but do not match. Copy the value directly from a test bundle output rather than typing it in manually if you are unsure.