Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Is there a way to add multiple expresssions to the formula tool at one time?

nick-pan
5 - Atom

I'm currently having to add multiple expressions to the formula tool every time there's a new instance. Is there a way to add these expressions all at once? Here's an example:

 

Right now I have to add numbers to the end of each new expression manually.

replace([newData],"{Line_ID}",[Line ID])

replace([newData],"{Unit Cost}",[Unit_Cost])

replace([newData],"{Unit of Measure}",[Unit_of_Measure])

replace([newData],"{Quantity}",[Quantity])

replace([newData],"{Spend Category}",[Spend_Category])

replace([newData],"{Line_ID 2}",[Line ID 2])

replace([newData],"{Unit Cost 2}",[Unit_Cost 2])

replace([newData],"{Unit of Measure 2}",[Unit_of_Measure 2])

replace([newData],"{Quantity 2}",[Quantity 2])

replace([newData],"{Spend Category 2}",[Spend_Category 2])

 

Is there a limit as to how many expressions are allowed in the formula tool at once?

 

Any help is appreciated!

 

Thanks!

 

4 REPLIES 4
HW1
9 - Comet

You can use the 'Find and Replace'  tool for your use.

Qiu
20 - Arcturus
20 - Arcturus

@nick-pan 
Same opinion of @HW1 , I would also recommend to use Find and Replace tool for this case.
We can have a master look-up table, which can be updated for new cases easily.

0523-nick-pan.PNG

nick-pan
5 - Atom

This wouldn't work since I'm mainly focusing on adding expressions to the formula tool. Each replace() is one expression in the formula tool and I'm trying to add 5 expressions to the formula tool at a time with numbers increasing by 1.

ddiesel
13 - Pulsar
13 - Pulsar

Hi @nick-pan!

 

It's hard to picture a solution without a sample of the data, but I think I understand.

I agree with @Qiu and @HW1 that the Find and Replace tool is the way to go.

 

I think the only piece you are missing is getting the replacement values associated with the field names so you have variables to work with.

 

Mock values:

Capture2.JPG

 

Capture.JPG

 

Please try the attached workflow and let us know if it will work for you.

 

Thanks,
Deb

 

Labels