Hi,
I have a table with different variables and and various formulas in one column. Does anybody know what I have to do that the Formula Tool interprets the column with the formula as function and not as string?
Example:
EW | FL | FORMULA |
100 | 100 | [EW/[FL] |
200 | 100 | [EW] |
3 | 10000 | [FL ]+[EW] |
700 | 25 | Round([EW]/[FL],1)+LOG(0.5) |
Thanks!
Solved! Go to Solution.
The formula tool should not add the column as a string, unless there is quote marks around the formula you've written? The tool applies 1 formula to each row, so will not be able to produce different rows within 1 column as shown in your table.
I'm not sure I fully understand. are you able to attach the workflow you are working on?
Use the Dynamic Replace tool
Hi @WKiehn
The Dynamic Replace found in the Developer group can evaluate formulas that are contained in string fields, if you check the "Values are Expressions/Formulas". The one caveat is that the formula will be applied to all the records in the dataset. If you have differing formulas for each row, you'll have to wrap it in a batch macro that processes the records one a time
Dan
Hi @WKiehn ,
Echoing what @ChrisTX mentioned about the Dynamic Replace tool.
Here's a great Tool Mastery article on the tool. Hope that helps! https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Tool-Mastery-Dynamic-Replace/ta-p/121655
Cheers!
Esther
Thanks Dan!
Dynamic Replace is a great tool and with the batch macro it solves my issue.
@Esthter: Thanks for the link, it's very helpful.
Werner
Hi. I'm trying to accomplish the same but struggling with the configuration of the dynamic replace within the batch. Are you able to share your example for me to emulate? Thanks.
Perfect; I hadn't adjusted the union settings in the macro. Thank you!!!