This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I'm trying to create a macro that converts money to USD. I want all the fields (ones both necessary and unnecessary to the macro to stay the same) I want it to add a new field that is dynamic to the name of the field being converted ("Amount") with the suffix of '_USD'. Something like the table below. I can do the math pretty easily with a join to a currency table and a formula, but the new field is always static. How would I get it to be a dynamically named whatever was converted by the macro regardless of what that field was called?
Since the name of the source column(Amount in your example) can change, you must have some way to specify which column to use in your macro otherwise your formula tool wouldn't work. Use the same input that you use to update your formula to update the rename section of a select tool, with "_USD" appended
You use a newer version of Alteryx than I do (I'm still on 2018.1 because my company's IT team needs to approve all software to be installed), so I cannot open your attachment. I tried to mirror what you were trying to accomplish but it would not work for me. Even if I got it working, I believe it oversimplifies what I'm trying to do. The alpha, beta, and gamma are just hypothetical columns. I would want the macro to identify the three necessary columns to perform the calculation and just push the others through to the end unchanged. Your solution appears too narrow
Assuming that for each workflow you are running this process for, you are willing to specify the actual "Amount" field, here's a really quick example. I'm going to assume that you can add into the macro the process to create the USD value, and that this will occur before the SELECT tool in my macro.
If you choose to use a column name other than _USD as the baseline value, you will need to reconfigure the SELECT tool and the ACTION tool slightly, but I think this example should make that clear.