Alteryx Designer Desktop Discussions

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

Is there a way Alteryx can consume input files by dynamically passing in a value.

SrinivasanSugumaran
8 - Asteroid

Hi Team,

I have a folder where in there are files of the same format but with different date.(sample attached below). Is there a way i can key in the number of days as a parameter by the user so that alteryx consumes only those number of files.

 

Input File 2022_01_01.xlsx

Input File 2022_01_02.xlsx

Input File 2022_01_03.xlsx

 

Say for eg. i create a col. Total days, and if i dynamically update the value as 2 for Total days then my workflow should consume only the first 2 files.

 

Appreciate your help.

11 REPLIES 11
Qiu
20 - Arcturus
20 - Arcturus

@SrinivasanSugumaran 
Given the shema of your input files are same, we can do something as below.

0607-SrinivasanSugumaran.PNG

grazitti_sapna
17 - Castor

Hello @SrinivasanSugumaran, there is no direct way to your requirement as of I know but I hope this helps.

In the below scenario you will not have to read all the data then filter out the records instead read the files first then filter the required file then read the data.

 

1. I used a directory tool to read all files in the folder, as you mentioned it will have the same schema. Then I used the record id tool to assign an ID assuming the file names are sorted as in the screenshot below.

 

grazitti_sapna_0-1654577524270.png

Using the text box tool I am dynamically passing the value 2 which will store the value in a field "Value" used in the formula tool.

 

grazitti_sapna_1-1654577599388.png

 

Using the filter tool I filtered the value assuming the minimum value of the days would be 1. Below is the logic.

grazitti_sapna_2-1654577674260.png

Therefore when running the workflow as an app you will get the following values. (Total Days=2)

 

grazitti_sapna_3-1654577738509.png

 

 

2. Next step would be using a dynamic input tool using the following configuration.

grazitti_sapna_4-1654577817801.png

 

Getting the final result.

 

grazitti_sapna_5-1654577917320.png

 

I hope this really helps!

 

Thanks!

 

 

 

 

 

 

 

Sapna Gupta
SrinivasanSugumaran
8 - Asteroid

Thanks @Qiu  and @grazitti_sapna . It worked.

Qiu
20 - Arcturus
20 - Arcturus

@SrinivasanSugumaran 
Glad to help and thank you for the feedback.

suby
11 - Bolide

Hi Sapna,

 

I did replicated your workflow Macro but bit stuck with how to run that as an app..

 

When i downloaded the yxwz i cant see the workflow any suggestions ?

DavidSkaife
13 - Pulsar

Hi @suby 

 

If you right click on the file and select edit that should open it in Alteryx as the workflow, rather than as the app itself

suby
11 - Bolide

I did tried to right click the yxwz and selected edit using the Alteryx designer but still i get the app Interface..

grazitti_sapna
17 - Castor

Hi @suby, try opening the file from Alteryx. Please look at the screenshot attached.

grazitti_sapna_0-1655402402087.png

 

Another way would be to drag and drop the file into alteryx canvas.

 

I hope this helps!

 

Thanks!

Sapna Gupta
suby
11 - Bolide

Hi Sapna,

 

Thanks that works just couple of questions.

 

- Once this Macro is done what's the next steps to test the app.. I presume this Macro will give the user the ability to type total Days say for example if the user types in 2 then it should pick the first two files is that Right ?

 

- Once the user types in 2 then it should pick the two files and then how we can see the combine Data from those two files..

 

Thanks

Labels