Alteryx Designer Desktop Discussions

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

Tree function in section interface and Display problem

awojciechowski
8 - Asteroid

I rebuild my workflow and now i see results but only one row, do you know what i should change to collect all written information when someone use "Finish button" or "Run Workflow".

Second question is about option "Tree" which is available in section Interface in Toolbar.

I have problem to show information which chosen in Interface, because Alteryx show me only number but i want detailed information.

 

in attachment you can find my workflow.

 

e.g.

1) I choose second option and only A and C

1.JPG

2) In results I can see only number. The same is in Airline if i chose more then one Airline in table i see only one.

2.JPG

 

Thanks for the advice and help :)

 

 

 

 

9 REPLIES 9
NicoleJohnson
ACE Emeritus
ACE Emeritus

Ok, I think I know what's happening here... when you use the multiple-selection types of input tools, it will bring in all the values in one field with a delimiter between them.

 

For the Airlines example, the responses will come across in the following format, with "TRUE" or "FALSE" depending on the boxes checked:

 

40 MILE AIR=True,9G RAIL LIMITED=False,ABX AIR=True,ACCESRAIL=False,ACCTION AIRLINES=False,ADA AREOLINES DE ANTIQQUIA=False

 

So each option in your check list will be included in the cell with a comma between them. To get multiple lines to show up for your Airlines selections, you should use the Text to Columns tool, Split to Rows (instead of columns), and designate the , comma as your delimiter. You can then filter out the lines that have False and remove the "=True" from the end of each Airline selection that remains using a formula tool, etc.

 

For the Tree example, the responses come across with a new line delimiter for each new selection, again showing up all in one field. (You can tell this is what is happening in the example you show in your posting if you hover over the red triangle that pops up in the upper right corner of the field in the Results window... will tell you that there are new lines).

 

Include Specified Partners: A
Include Specified Partners: C

 

So to split this one out to rows, you will do the same as Airlines above, just using the new line delimiter \n to split the Partner Selection to new rows.

 

The end result will be one row for every combination of Airline + Partner Selection made. See attached, made some modifications (you'll need to reconnect the file you're using for your Tree, I had to make one up to get it to run on my machine). Questions, let me know!

 

NJ

awojciechowski
8 - Asteroid

Hi @NicoleJohnson 

Unfortunately I don't know how it works, so I don't know how and what i should change to see in table one row with chosen options (not numbers).

If you can please share me final result and tell me step by step, what you change and why in this way, or/and if you know where i can find more knowledge about it please send me example of URL - I know that i need yet a lot of help but I'm still learning this smart application Alteryx.

 

I wiil be very grateful for all advice and helpful knowledge.

 

*In attachment is my example of "tree table".

NicoleJohnson
ACE Emeritus
ACE Emeritus

Can you perhaps include an example of what you want it to look like as an end result? I'm not sure I'm following what you're trying to achieve. I included an example of how things were configured in my original post, so you should be able to download it and see how I configured the tools per the instructions I included in my response... were you able to download my example?

 

Thanks,

NJ

NicoleJohnson
ACE Emeritus
ACE Emeritus

In case the explanation I provided earlier wasn't super clear, here is an example showing what I mean about the results coming across in multiple lines & with True/False designations when using trees and check boxes as input types. If you open the example I provided in my first response, you should be able to follow along (also attached here for reference).

 

For Airlines (check box input), you'll see that if you select choices 2, 4, and 6 (I just used the abbreviations in the example below to save on screen real estate in the example), then those options will have "=True" listed after them, with "=False" listed after the other options.

 

Airlines.JPG

 

 

So to get them to separate out onto separate lines, you'll need to add a Text to Columns tool following your original text input tool that is getting its values from the inputs you select in your app. Configure the Text to Columns tool to split to Rows based on the , (comma) delimiter. This will change your results to look like the following (one line per Airline selected). At that point, you can filter out rows that contain the word "False" in the Airlines field, and use formulas to remove the "=True" suffix from the rest. See my example for possible configurations for these tools.

 

For the Partner Selections (tree), you'll need to use the Text to Columns tool to split wherever there is a new line (see below). The delimiter for this is \n. This will change your results to have a separate row for every checkbox selected in the Partner Selection field (so if you select Exclude A & B, your results will show 31 and 32 on separate lines, as those are the keys for those selections).

 

Partner.JPG

 

If that was not the clarification you were looking for, please include some examples of what you'd like your results to look like so that we better understand what you're trying to achieve? Thanks!

 

NJ

awojciechowski
8 - Asteroid

Hi,

I understand what you say about Airlines and this what is showing is ok but what we should change to show also information from Partner selection.
I want to see name of this box, not number and i want to see detail chosen so e.g. "Include Specific Partners" & "A" & "C".
It makes sense for you?

 

Unfortunately now I see only number:

1.JPG

NicoleJohnson
ACE Emeritus
ACE Emeritus

Aha! Now I see what you're asking.

 

Okay, you should be able to do that by bringing in your tree data source and then using some formulas & a Find and Replace tool to replace the numeric representation of your selections with the word versions.


See attached workflow that has this added branch to do the Find & Replace function. Basically, when you select your values in the tree, it brings over Key designation (1, 11, 12, 13, 2, 21, 22, 23, etc.) instead of the descriptions. So by bringing that table in separately (and using some formulas to create the right combined descriptions for each key value), you can then match those keys to the values from your chosen selections and return the description instead.

 

Hopefully looking at the workflow will make a bit more sense :)

 

Thanks!

NJ

awojciechowski
8 - Asteroid

I will try use it tomorrow but maybe you can give me one more advice... what is the best way to output this information from my App to other workflow.

e.g. i want use multiply client id and start and end date in second workflow.

Of course one option is save this table and then import using input, but i don't think that this is the best option  :)

 

Could you say something about it?

 

NicoleJohnson
ACE Emeritus
ACE Emeritus
Ideally, you should just put the app workflow into your other workflow (making the whole thing an app). That way the selection of the values is in the same workflow as the rest of the workflow you're trying to run.

Otherwise, you will need to write the values back to some sort of database, Excel file, CSV file, etc. that you can then pull in to your other workflow. But if you're wanting the workflow to run immediately after selecting values (which seems like the logical case) then you would want to just copy/paste the tools in your app workflow and use them inside of the final workflow you want to run.

Make sense? Let me know! Thanks!

NJ
awojciechowski
8 - Asteroid

thanks, i know about this two possibilities but I thought it would be possible to do something more automatically.

I found this https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Tool-Mastery-Dynamic-Input/ta-p/24946

but unfortunately it also require for me use "run" in second workflow.

Labels