Alteryx Designer Desktop Discussions

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

Applying Conditions in Developing App

sriniprad08
11 - Bolide

Hi Team,

Hope you are well. I need help.

Please find below the description of my problem

I am trying to develop a App where in user can enter the key word and the app can extract all the location of the files or folders with the user input keyword.

 

Description of the problem

For e.g. if i have a sql database with two columns one is File/Folder Name and other column is Location of the folder. In this case of the file name is Payrol and there will be a location where this file is saved.

When the user inputs "Payrol" the App should share the location of the file. I am kind of mocking it up by first reading files through my desk top and make the app search through it.

 

Current solution 

The app is running but its giving me all the files in that folder. I want only the files related to "payrol". I have tried using conditions in App but not sure how to go about it.

 

Need help

 

How can the app select the files or folders based on the user input Keyword.

 

sriniprad08_0-1679830619411.png

 

Please let me know,

Thanks,

Sri

16 REPLIES 16
BS_THE_ANALYST
14 - Magnetar

@sriniprad08  In the directory tool:

BS_THE_ANALYST_0-1679830962496.png

You have *.* 

Could you try:
*payrol*.*

 

This would restrict the files to ones that have payrol inside the file name?

 

sriniprad08
11 - Bolide

Hi @BS_THE_ANALYST ,

thank you so much for the help. I would like it to be dynamic rather than specific key word. Thats why i am giving the user an opportunity to search for the file they want not only payrol. One of the user may want to see payrol and few others have different requirement.

 

Please let me know how can i make it dynamic,

 

Thanks,

Sri

BS_THE_ANALYST
14 - Magnetar

@sriniprad08 hey! I see the problem now.

Check this: 
Here's my directory:

BS_THE_ANALYST_0-1679831783073.png

 

I want a User to only select these one's highlighted, i.e. they contain the keyword "Section"

 

Let us check this works:

BS_THE_ANALYST_1-1679831839564.png


Looks to be a success! 

BS_THE_ANALYST_2-1679831858514.png


Here is how I configured it:

BS_THE_ANALYST_3-1679831888554.png


Hope this helps! I've attached the workflow aswell. 

Basically, in the *.* part of the directory tool, I used the formula ReplaceFirst to replace the first * with *KEYWORD*

sriniprad08
11 - Bolide

Excellent @BS_THE_ANALYST . This is great. You have been really helpful.

Couple of more help if i can ask.

 

1) Is it possible to output the results for e.g. (file name/file location) to an excel file? Can you please guide?

2) In this case we have given specific folder. Is it possible to provide a directory ( as a location) or a (Sql table) to search please?

3) How to display the results in server please? if i run it in server it says the below

sriniprad08_0-1679832564624.png

 

 

Cheers,

Sri

BS_THE_ANALYST
14 - Magnetar

To answer question 1) 

Yes, we just need to drag an Output tool onto the canvas, and point the Output tool to where you'd like the results to be saved to. I also dragged a Select tool onto the canvas to only take the File Name and Location.

BS_THE_ANALYST_0-1679832654859.png

BS_THE_ANALYST_1-1679832680558.png

Testing that this works:
Step 1: 

BS_THE_ANALYST_2-1679832707302.png

Step 2:

BS_THE_ANALYST_3-1679832730473.png

Step 3:
Clicking on the OK button in step 2 to open the results file:

BS_THE_ANALYST_4-1679832770742.png


Step 1) is successful!

To answer your question about 2). I haven't had any experience with connecting to a SQL table yet, however, yes is the answer. You can certainly connect to a SQL table. I can't point you in the correct direction just yet, tonight I will take a look if the question hasn't been answered though! 😀


Regarding 3), I haven't worked with Alteryx Server yet. But can I just check one thing that you're doing in the app:
Do you have this part ticked in the Interface Designer

BS_THE_ANALYST_0-1679833075873.png

If no, 
this is how (look at all the arrows, they show you how to open the Interface Designer and configure appropriately)

BS_THE_ANALYST_2-1679833156387.png

 



Hope that helps @sriniprad08 

Thanks,
BS

 

sriniprad08
11 - Bolide

Thank you so much @BS_THE_ANALYST  Really appreciate the time and support. You have been really helpful.

This is great support you have provided.

I will mark your solution as the acceptable solution. Just wait till today evening if anyone can reply on Sql and i will close this loop. if i close this now then probably people cant see it further i believe not sure how the community works.

 

Have a nice weekend,

 

Cheers,

Sri

sriniprad08
11 - Bolide

@BS_THE_ANALYST  sorry one last question

on point number 2). Is it possible to provide a location of a directory rather than a specific file location. ?

 

Cheers,

Sri

BS_THE_ANALYST
14 - Magnetar

@sriniprad08 I updated my previous post, I didn't read the part about Server. Check my updated response, hopefully that can help for the server part. However, if it doesn't help, it's probably a Server related issue VS Altery Designer. Hopefully that works for you though! I don't have experience with Server yet so I'd suck with debugging that part.

Don't mark it as Acceptable if it isn't completing all the steps you want as people may think the whole problem is solved!

All the best,
BS

danilang
19 - Altair
19 - Altair

Hi @sriniprad08 

 

You can mark either or both of @BS_THE_ANALYST posts as the accepted solution at any time.  Accepting a solution does not lock the thread.  People will still be able to view, reply and even present alternative solutions.

 

Dan   

Labels