Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Sql Query structure

praneshsapmm
8 - Asteroid

Dear Community,

 

I have requirement which is more related to SQL rather Alteryx .

 

Item Col1Col2Col3Col4Col5
A111223344
B211223344
C311223344
D411223344
A12345
B12111

 

Database contains huge data as shown above . Each columns 'Item' must run through the workflow as shown below (just an example but is more complicated) . When i try to pull the data all at a time , my system hangs and takes a lot of time to process . 

 

Is there a way to process the data by 'item' at a time . Complete the workflow and process the next 'Item' . 

 

My workflow is shown here : 

workflow.jpg

Any help is appreciated.  

 

 

22 REPLIES 22
praneshsapmm
8 - Asteroid

Hi@grazitti_sapna 

 

Great help !!

 

My output is as shown :

 

Iam not sure why selected value is not picked up by filter . May be iam missing something .

 

 

praneshsapmm_1-1604473910785.png

 

praneshsapmm_3-1604474030481.png

 

 

grazitti_sapna
17 - Castor

Hi @praneshsapmm,

 

Pass a default value in your filter and try and replace that value from the list.

 

grazitti_sapna_0-1604474365766.png

 

I have passed default as A and from the expression [Item]="A", I will be replacing A with the input values.

 

grazitti_sapna_1-1604474444632.png

 

 

Sapna Gupta
praneshsapmm
8 - Asteroid

Hi@grazitti_sapna ,

 

Yes i did . 

 

Here i have made 'SW1' as default but passing 'SW2' as input from list box prompt . 

 

praneshsapmm_0-1604474958017.png

 

praneshsapmm_1-1604474997518.png

 

Ideally 'SW2' must be returned . But output is 'SW1' .

 

 

praneshsapmm_2-1604475054077.png

 

 

grazitti_sapna
17 - Castor

Hi @praneshsapmm,

 

can you please try and feed the Value "SW2" using text input tool and control parameter as I had done in the Workflow attached earlier?

 

Can you make use of the workflow and macro that I had shared by just changing the values A B C with values such as SW1, SW2 etc.

 

In the screenshots that you have attached, I can see that you have not selected the filter tool but you have just edited the value in replace string and changed that with SW2. Ideally it should be like as shown below:

 

1) Initially while just selecting the filter in update value it will show the whole filter condition in "Replace a Specific String"

grazitti_sapna_0-1604475494453.png

 

2) Now for my use case, I don't want to replace the whole filter condition, rather I only want to replace A with incoming value through control parameter from text input, which is B in my case. So I have omitted [Item]="" from the Replace a Specific string and I have only kept A there. But if you see the screenshot the selection for filter in the update values is a must.

 

grazitti_sapna_1-1604475680451.png

 

If it still not works for you, I suggest you change the values in the workflow that was shared by me earlier and see if it is working for your use case.

 

 

 

Sapna Gupta
praneshsapmm
8 - Asteroid

Hi@grazitti_sapna 

 

I had modified the way you mentioned . It is working .. workflow attached . 

 

But when i replace control parameter with List box and try to send the value , it does not work. 

 

Thanks

 

 

grazitti_sapna
17 - Castor

Hi @praneshsapmm,

 

You can make your workflow using control parameter also. It will run the number of iterations based on the items in the text input. Suppose if you have 7 items in the text input then the macro will run 7 times using control parameter also.

 

 

Sapna Gupta
praneshsapmm
8 - Asteroid

Hi@grazitti_sapna 

 

Thankyou for all the responses .

 

One more question . I would like to connect this workflow to database and i like to process data only by values entered by user . 

 

For example : If user wants to process only SW1 and not rest , how this could be handled . Next time SW2 and so on , without altering the filter everytime .

 

Thanks.

grazitti_sapna
17 - Castor
praneshsapmm
8 - Asteroid

Hi ,

 

Iam running this batch macro to pass and filter the value based on check box input . 

praneshsapmm_0-1604512947878.png

But this fails to return values , when multiple boxes are checked in . Can someone let me how to pass through multiple values .

 

Thanks

praneshsapmm
8 - Asteroid

Hi @grazitti_sapna 

 

Can you let me know is it possible to pass multiple values through list box and update tool .

 

It fails for me when i do it .

 

Thanks.

 

praneshsapmm_0-1604557257368.png

 

Labels