Alteryx Designer Desktop Discussions

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

List Box & Formula tool

danielmaguire
8 - Asteroid

Hi,

 

I am having trouble with combining the list box tool with the formula tool. Say for example I have 8 fields in the list box option (a,b,c,d,e,f,g,h). How can I get the formula tool to create a new column titled 'Total' which sums my selected fields. For example if I select a,b,c it should calculate: [a]+[b]+[c] in the new field? Or if I select d,e,f,g it should calculate [d]+[e]+[f]+[g] in the new field?

 

Any help is greatly appreciated.

 

Kind regards,

Daniel

10 REPLIES 10
atcodedog05
22 - Nova
22 - Nova

Hi @danielmaguire 

 

Can you provide your workflow

mbarone
16 - Nebula
16 - Nebula

If you could upload a mock module, that would help.  You'll probably want to use the option in the list box to "Generate Custom List" with the brackets and + sign. 

danielmaguire
8 - Asteroid

Essentially, whatever the user selects from the list box, i want the find and replace to append fields to record that selection and then i want to sum that selection in the formula tool and insert it into a new column called 'Total'.

atcodedog05
22 - Nova
22 - Nova

Hi @danielmaguire ,

 

Here is the modified workflow to do it.

atcodedog05_0-1601046447479.png

 

You need action on select tool to pick only specific columns

 

Hope this helps : )

 

If this helps please mark the post as solution.

danielmaguire
8 - Asteroid

Hi, thanks for providing the workflow. I am still getting an error on the Find & Replace tool. Let's say if my input only includes a,b,c. I am getting the error that 'd' is not contained in the record. I believe that this is because d,e,f etc. is included in the 'append fields to include' but it is not in my input. Any advice would be greatly appreciated.

atcodedog05
22 - Nova
22 - Nova

Hi @danielmaguire 

 

Is it possible to use Join Tool instead of Find & Replace tool ?

 

If yes selecting this last column

atcodedog05_0-1601048363717.png

Might do your job

 

danielmaguire
8 - Asteroid

Hi,

 

Not possible as I need the specific format.

atcodedog05
22 - Nova
22 - Nova

Hi @danielmaguire ,

 

If you can provide the master workflow i can help you out.

 

You can use RecordID created by RecordID tool as a additional key.

danilang
19 - Altair
19 - Altair

Hi @danielmaguire 

 

Connect the List Input to the Find Replace 

 

w.png

Set the action type to Update Field List(Default) and make sure that the ReplaceAppendFields is highlighted

a.png

Both the Find Replace and the Select will follow the fields selected in the List Input

 

Dan

Labels