Alteryx Analytics Hub

Find answers, ask questions, and share expertise about Alteryx Analytics Hub.

Formula tool query

Jackmcc26
6 - Meteoroid

Morning everyone, regarding the formula tool, i do have a couple of questions. Are multiple columns able to be updated with a single expression? And can the expression remove already existing columns?

 

Thanks

2 REPLIES 2
atcodedog05
21 - Polaris

Hi @Jackmcc26 

 

Answers to your questions.

 

1. Are multiple columns able to be updated with a single expression?

No, you would need mutiple expressions to update mutiple columns. If the expression is same you can use Multi-Field formula tool to apply the formula on mutiple columns.

https://community.alteryx.com/t5/Interactive-Lessons/Multi-Field-Formulas/ta-p/424422

 

2. Can the expression remove already existing columns?

No, Formula tool doesnt have the capability to remove columns you would need a select tool or tool with embedded select window (like join tool, append tool) to remove columns.

 

Hope this helps : )

terry10
11 - Bolide

As atcodedog05 said, use the Multi-Field formula tool to update multiple columns.

  • A formula using the [_CurrentField_] variable will be applied to each of the checked columns. 
  • You have the option of overwriting the existing column or adding new columns for the output. Leave "Copy Output Fields and Add" unchecked to overwrite the existing field.

terry10_0-1631941598751.png

 

Labels