community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx Designer Ideas

Share your Designer product ideas - we're listening!
#SANTALYTICS

Gather all 9 clues to complete the final Weekly Challenge on Dec 16!

Learn More

Indirect function in the Multi-field function

There's a common need to perform the same function on many fields, where you want to bring in data from a secondary field which is defined by the current column name.

 

So - for example:

Input:

  • Prod1UnitWeight: 10
  • Prod1Qty: 10
  • Prod2UnitWeight:15
  • Prod2Qty: 1

Output

  • Prod1TotalWeight: 100
  • Prod2TotalWeight: 15

 

So it would be useful to be able to have an indirect function where you can create a string which contains the field you want to use; and then indirect to it.

For example: 

  • Multi-field formula on Prod1Qty; and ProdQty
  • CreateNewField Prod1TotalWeight
  • [_CurrentField_] + indirect(replace([_currentFieldName_],"Qty","UnitWeight")
  • which would resolve to prod1Qty * indirect("Prod1UnitWeight")

 

 

2017-10-09_9-57-08.png

2 Comments
Alteryx Alumni (Retired)
Status changed to: Under Review

Thanks for the suggestion.  This is  something we have discussed a couple of times but it has not risen to the top of our priorities.   Are there other scenarios besides the Field1, Field2, Field3, kind of scenario where something like this, or the idea of an "eval" on a field name would be useful within the formula tools?  You talk about this feature in terms of multi-field formula.  Is there an application for this in regular formulas?

 

Thanks,
Ben