We've all been there, you have a complicated conditional statement. Nested if statements or extremely long case statements. They aren't fun and can be quite cumbersome. Worst off, they are hard to maintain. This is where Dynamic Replace comes into play. For those of you who have never used the tool, it can be used in a variety of manners, but the best feature is it's ability to process expressions that are contained in a column. Meaning, a column can have a written out Alteryx formula that can be converted from a string that shows the formula into the formula's solution. Example time:
Before - a generic case statement
After - storing expressions in a text input or you can keep it in a stored excel/csv file for easy editing!
I have also cut down the hard work so you can throw this macro into your own workflows without having to wrangle with the Dynamic Replace function. Now it's as easy as selecting the column that contains the expression, and this macro will return the solution.
Final Output
Easy and simple, no more nested logic! Hope this helps, see attached zipped workflow so you can test it out for yourself!
@TylerAV Thanks for this tip !