Alteryx Designer Desktop Discussions

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

Issue with an App

iocana
7 - Meteor

Hi

 

I have two inputs, one is my population input and the other one generates an output that I need to use to automatically update the Random Sample %. However, I am not able to do this, even though I have selected Update value by default with the action tool and selected "10" which is the default % set up.

 

I cannot upload the original workflow and data but I have generated a similar version for asking this question. The number 53 is not always the same. I mean, it is coming from different sources of data therefore depending on the input that I am using, it will be 53, 40, 20,1...any number. And here is where I have the problem, because the app is not picking up the new one, it takes the one that I used to configure the app. 

 

 

I would appreciate any help on this regard

 

Thanks!

 

8 REPLIES 8
mceleavey
17 - Castor
17 - Castor

Hi @iocana ,

 

I've made a slight change to enable the first dropdown to be correctly populated. You currently don't have anything populating the dropdown as you have not pivoted the data to column header per value.

It's a quirk of the dropdown tool that the values that are available for selection from an incoming source are taken from the headers rather than column values.

 

mceleavey_0-1625566403055.png

 

This now should work.

 

Hope this helps,

 

M.

 



Bulien

iocana
7 - Meteor

Many thanks for this M!

 

I tried this before, the problem is that the number 53 is not always the same. I mean, it is coming from different sources of data therefore depending on the input that I am using, it will be 53, 40, 20,1...any number. And here is where I have the problem, because the app is not picking up the new one, it takes the one that I used to configure the app. Any idea with this?

mceleavey
17 - Castor
17 - Castor

@iocana without seeing your workflow representing this it's impossible for me to say, but wherever that number is, it simply needs to be pivoted to be the header of the columns, as I built. This will always be dynamic. Then this will auto update your dropdown selections each time.

 

If you want to post a more accurate workflow I can look at that for you.

 

M.



Bulien

iocana
7 - Meteor

@mceleavey  I have created a new workflow including your solution. I also attach an input that you can use for testing. If you firstly use Sheet1, you will get one output with the % of records automatically coming from the cross tab headers, then if you use Sheet2 you will get the wrong % of the total records as it will not update the % in the sample tool. (i.e. the recommended sample size will say % = 5 but alteryx will not generate a sample of 5% of your population)

 

Does this make sense? It is a bit hard to explain with words but hopefully the attached helps

danilang
19 - Altair
19 - Altair

Hi @iocana 

 

The issue that you're seeing is caused by the fact that Alteryx builds all the user interface tools before the workflow is run.  For UI elements that use Fields From a Connected tool, this information is taken from the metadata contained in the original workflow.  if the value displayed is the result of a Crosstab, the values in the UI are from the last time that the workflow was run before being saved.  You can see this by changing the 53 value in the first Text Input tool and then running it as an App, NOT as a normal workflow.  The value in the drop down will be the previous value.  

 

To get a dynamic set of values, configure the UI tool to read the list values from an external source

danilang_0-1625569726535.png

This source needs to to have a name|value fields like the the text input tool. 

 

Dan

iocana
7 - Meteor

Hi @danilang 

 

Many thanks for this. It makes sense and I understand now what it is happening. Considering your solution, if I select from external source, I understand that this cannot be done within the same app? I mean I cannot have the recommended sample size that I want to use to update the Random % Sample in the same workflow than my total population + random % sample + final output right? I would have to create to apps?

 

thanks!

danilang
19 - Altair
19 - Altair

@iocana 

 

If the Input file comes from an external source and is always in the place, you can simply change the location in the UI tool.  If the input file is generated as part of workflow, then you'll need a Chained App.  Part 1 generates the Dropdown list and stores it somewhere accessible such as the %Temp% directory.  Part 2 runs the rest of the workflow with the UI tool reading from the newly generated file.

 

Dan

mceleavey
17 - Castor
17 - Castor

Hi @iocana ,

 

I understand your problem. You are looking to apply random sampling to the data each time it runs, which means the workflow needs to run to then give you the population of the dropdown. For this you need to use chained apps, as the result will need to be populated in a second app as a result of the first.

This means you need to set the second app to take the parameters from an external source.

 

This fixes the issues, as attached.

However, and this might just be the example you've provided, if you are only ever getting one value on drop-down then obviously you would never use the dropdown, you would simply feed in the value and remove the requirement to select from a dropdown every time.

However, one problem at a time!

 

Try the chained app attached (.yxzp) and let me know if this is what you need.

 

M.

 

 

 

 

 



Bulien

Labels