Alteryx Designer Desktop Discussions

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

Pass a value to a Random Sample Tool

WCPete
6 - Meteoroid

 

I am trying to pass a value I calculate in one section of a workflow to a 'Random Sample Tool' so I do not have to manually type the value in.  I used a text input tool for the attached example, but, the text input will be replaced with an actual file in the future.

 

I would appreciate any help.  

 

Thanks You

 

6 REPLIES 6
MSalvage
11 - Bolide

Hi @WCPete,

 

I would recommend using a batch macro for this process. The number you have calculated will go into the control parameter then you will use an action tool to update the value in the random sample tool with this value.

 

It should look something like this.

WCPete Batch Macro Snip.PNG

 

Hope this helps,

MSalvage

WCPete
6 - Meteoroid

Thanks @MSalvage - but - I am not sure how to configure the tools.  I tried this, but, I get an error "Control Parameter must be mapped to a field".

 

I will keep looking :).  

 

 

MSalvage
11 - Bolide

@WCPete,

 

Make Sure you click on the Questions tab and select which field contains the Update Value.

 

WCPete Question Snip.PNG

Best,

MSalvage

WCPete
6 - Meteoroid

Thanks again @Msalvage, but, I have never used a batch macro or had to in the past so I am still struggling. 

Macro Update.PNG

MSalvage
11 - Bolide

@WCPete,

 

Attached is a working example, might need some slight tweaking, but hopefully it will get you going.

 

Best,

MSalvage

WCPete
6 - Meteoroid

Thanks @MSalvage!  I am sure that took longer than you anticipated.  

 

I have included the final workflow. 

 

I am leaving these questions out there in the event someone can point me to a good example demonstration on these.  

 

1. I am not sure the reason to update this Text Input other than to accept the field I am passing in the workflow?

Input Control.PNG

 

I am not sure why I needed to update the second drop down or how it affects my workflow?

Question Update.PNG

Thanks again @MSalvage!

Labels