I am attempting to write a formula that outputs a number when a certain word is called upon.
I currently have:
IF [PRODUCT NAME] = "Hammer" THEN [LIMIT_QUANTITY_VOD__C] = 5 ELSE Null() ENDIF
However, the output keeps putting a 0 in the column rather than a 5. It seems as though this is a very simple fix however I can not crack it as I am new to alteryx.
Solved! Go to Solution.
[LIMIT_QUANTITY_VOD__C]=5 is a boolean statement. 0 means false - if [LIMIT_QUANTITY_VOD__C]=5 was true - you'd get -1 (aka true).
I think you are trying to overwrite the value of a field named [LIMIT_QUANTITY_VOD__C]
so you'd just write 5
so for a numeric field called [LIMIT_QUANTITY_VOD__C]
IF [PRODUCT NAME] = "Hammer" THEN 5 ELSE Null() ENDIF
@pbresney
The problem is with this [LIMIT_QUANTITY_VOD__C] = 5
This is a conditional statement, will return 0 as false and 1 as true.
We can fiix it like this.
Hi @pbresney
The formula tool works slightly differently in Alteryx compared to other coding languages.
If you look at the example below, you define the field you want to change or create first on the dropdown.
The formula is then simply: IF [PRODUCT NAME] = "Hammer" THEN 5 ELSE Null() ENDIF
Thank You!