Alteryx Designer Desktop Discussions

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

Relative Input File Paths in Apps Not Redirecting to Correct Folder

JakeW
7 - Meteor

Hello all,

 

I have an app that I am trying to read in dynamic file paths using relative paths. I've used both the directory tool, and the CReW macro's Wildcard Input tool, and both revert back to pulling in the file paths in the folders where I created the app. If I run it as a workflow within Designer it works fine. It's like as soon as I try to run it as an app, it doesn't know where it should be looking anymore. Not sure what i'm doing wrong. Any ideas would be greatly appreciated!

 

CReW Wildcard Input:

JakeW_0-1631223298305.png

 

Directory Tool Input:

JakeW_1-1631223404765.png

 

 

Thanks!

 

 

 

8 REPLIES 8
apathetichell
19 - Altair

do you have a folder browse tool hooked up to an action tool hooked up to the directory tool??? I don't see any action tools in what you posted so I can't see anything which would get updated.

JakeW
7 - Meteor

Good question. So, the nature of this app is to present the user a list box of files to choose from. I've made it that far. The app works great. However, when I move the app to another folder (where the folder structure is the same and it's run from the same subdirectory) it still only provides files from the old folder structure. I was hoping the app could be smart enough to navigate out automatically to find the files for the user based on where the app is ran from since it will be the same each time.

 

App interface below. The only interface tools I have is a list box that gets fed from the list of files that are found, and an action tool that updates a filter to only select the files the user wants to utilize. 

JakeW_0-1631281681308.png

 

JakeW_1-1631281832415.png

 

 

 

 

JakeW
7 - Meteor

So, I just ran a test. I made this little app with no user input, using a wildcard input tool and a relative path to go find some files. I ran it in two different directories and it found the correct files. So, it seems like it has something to do with how my list box is possibly set up on my original app. 

 

To further clarify things. We want to run this app within multiple, similar folder structures. For instance:

 

Folder 1

     Sub Folder A

     Sub Folder B

     Sub Folder C

 

Folder 2

     Sub Folder A

     Sub Folder B

     Sub Folder C

 

App will always be within Sub Folder B. It will go find files in Sub Folder A and C, which will always be named the same, and present them as a list box in the UI. I created this in Folder 1 but when I try to run this on Folder 2, my list box still shows files from Folder 1.   

 

 

 

apathetichell
19 - Altair

sorry - just saw your earlier post - so the app works - the directory tool doesn't? can you use a relative path for your directory? If not - how would you describe the logic for dynamically updating the directory?

JakeW
7 - Meteor

Hey Apathetichell,

 

Thanks for the response. The relative path within the directory or wildcard tools is what I have currently in the app. The issue is that, it doesn't appear to be "refreshing" to the folder that the user is running the app from. The list box that is provided to the user, returns file paths to the original directory where I created the app. It's like it's caching those files and not updating them to the current directory that it's being run from. 

 

I went ahead and attached the app that i'm having the issues with, although it i'm sure it won't work without our folder structure. 

 

Below is separate app I created with just a couple tools (no user input) using a relative path to test. I move this from folder 1 to folder 2 and it finds the correct files. This logic here has no issues and doesn't need any user input. So i'm super confused as to why these same tools won't update the files with the correct ones and feed them into the list box. 

 

Test app that works with no user input and a dynamic file path:

JakeW_0-1631287161400.png

 

 

 

apathetichell
19 - Altair

o.k. - now I kind of get what you want to do... you're saying you send this app to a new user - they pop it open - hit the execute button but it's still showing your directories files? Have them run it as a workflow and then as an app. If you want them to be able to change folders at run time - use a folder browse tool and an action tool - and create a chained app.

 

JakeW
7 - Meteor

That's exactly right. It's like it's remembering the last directory files that were run as a workflow instead of refreshing the files based on the new location of where the app is run from.

 

I was also thinking of the chained app workaround. However, if I have Chained App 1 that goes and finds these files, and Chained App 2 that present them to the user in a list box, is there a way to have the apps if they're copied to different folders together as a package, still know that 1 and 2 in that folder go together? So if I run App 1 will know to go to App 2 if it's sitting there in that folder with it? I only ask, because when I choose the app to run on success, it lets me pick a specific app from a folder, but i'm worried that won't be a relative path to that app.

apathetichell
19 - Altair

Yeah - you can package the workflows together either as packaged workflow/workflow group etc -.... I'd stick with folder browse/action tool into directory - it really gives your end user more optionality to find the files they want...

 

Labels