Hi Team, I'm trying to create a workflow where I need to have a dropdown for the user to pick a file from the list of files from the specific folder (the path has to be dynamic based on the username of the system)
I would need the highlighted Input File address need to be picked as a specified folder and the user need to see only the XLSX formatted files in that dropdown list and whichever they select, needs to be considered as an input file.
Please help, appreciate your help in advance. Thank you.
Hi @Rahulkanth , this workflow will show you how to do it. For some reason I can't upload screenshots at the moment, but the gist is that we use a directory tool to list our files, a filter to just keep .xlsx files, a cross-tab tool to make our file paths into field names, and a dynamic rename to sort out all the resulting underscores. We then can use this as an input to the drop-down tool. Hope this helps!
@FinnCharlton
This dropdown is actually not providing me with the file names that are in the folder. Example: If there is any new file that is uploaded to that folder, the new file is not appearing in that dropdown list. Moreover, I'm able to see the complete path in the dropdown list rather than just the file names. I have tried a different way to show up only the file names, but it was not showing the results as needed. Attached is the screenshot for your reference. Please help!
@geraldo
This option is actually providing the browse option, but I need to have a dropdown list of all the file names in the specified folder. Also, if there is any new file uploaded to that specified folder, the dropdown has to get auto-updated and I need to see all the file names. Please help!
Hi @Rahulkanth , sounds like the best option for you is a chained app. In the first app, run a directory tool and save an output file with two columns - one called 'NAME' with the file names, and one called 'VALUE' with the full path. In the second app, you can add a drop-down tool set to 'External Source', where you reference the file you created in the first app.
This is the only way to make the drop-down update dynamically every time you run the workflow.
@FinnCharlton
I have tried that alternative and I'm able to get the results accurately, but still, I would like to simplify things without creating multiple chained apps, instead relying on a single workflow. If there is no other alternative, then I would need to follow the chained app procedure.