I have an Alteryx app that asks users to input 5 different files using 5 different browsing options. Sometimes, the user may not have all 5 files to browse. So I am wondering if there is a way the workflow can still run when, for e.g., a user browses 4 files and leave 1 browse option empty. Hopefully, I am clear. Thank you for your time.
Solved! Go to Solution.
Hi @itssumanb ,
in your app, of they select null in one of the selections then overwrite that selection with a dummy file which you can package into the app. This allows it to progress without a selection without the tool throwing an error.
M.
Hi @mceleavey
Thank you so much for your quick response. That sounds like a great workaround. Are you able to provide me a little more direction as to where/how I should insert this logic in my workflow?
Hello @mceleavey
I have attached a test workflow. Thank you again for your help.
Hi @itssumanb ,
I've attached the workflow.
Basically, I've changed the action tools to update on a formula:
This say if the value is empty from the File Browse, then simply pick up the dummy file, else do what it would usually do.
The dummy file simply contains a column called "Dummy" with a value of "Y", which is then filtered out.
You just need to save the attached dummy file in the appropriate folder. I've set this to be:
if isnull([#1]) then "C:\Users\SBhattar\Desktop\Test file\Dummy File.xlsx" else [#1] endif
If you want this to be somewhere else, that's fine, but you just need to change the path in each action tool to be the path to where the dummy file is.
This should work now.
M.
hi @mceleavey
This is throwing the following error message
Error: Filter (24): Parse Error at char(1): Unknown variable "Dummy"
of course. If you select everything it won't have the dummy 🙂
Just remove the filter and remove the "Y" row from the dummy file. This will give you a null "Dummy" column which you can simply remove with a select tool.
Hope this helps,
M.
Hi @mceleavey First of all, thank you again for trying to help me here. I value your time and really appreciate your help.
I made the changes and tested by browsing to only one file. It is asking me to input the other four files:
Input Data (5): A file must be specified
Input Data (8): A file must be specified
Input Data (11): A file must be specified
Input Data (14): A file must be specified
@itssumanb , no problem.
This is telling you that you've selected only one file and the others can't find the dummy file. So, check and make sure you are pointing to the dummy file in the action formula:
if isnull([#1]) then "C:\Users\SBhattar\Desktop\Test file\Dummy File.xlsx" else [#1] endif
I've attached the workflow that works for me. If your dummy file is not in that folder it will give you the error you're seeing, so you will need to change it in the action tool formula.