Hi Team
Solved! Go to Solution.
You will need to turn that workflow into an analytic app and use an interface tool to pass through a value to the input tool.
In the article referenced it explains how to do this:
This runs an Analytic App (.yxwz) and uses the parameters in the AppValues.xml to dynamically configure the Analytic App. The easiest way to build the AppValues.xml file is to build a fully functioning Analytic App in the Alteryx GUI, open the Interface Designer window (View>>Interface Designer), click Test View, and click View. The xml in the pop up window can be copied (using CTRL-C) and pasted into a text editor and then saved as an .xml file.
Example of AppValues.xml:
<WizardValues ShowDebugMessages="False"> <Value name="FILEINPUT">TEST.CSV</Value> </WizardValues>
This is identical to the option above except instead of having the *.yxwz and the *.xml parameters, simply specify the *.xml parameter and ensure that the *.yxwz reference is embedded in the *.xml.
Example of AppValues.xml in this case:
<WizardValues ShowDebugMessages="False">
<Module>MyAnalyticApp.yxwz</Module> <Value name="FILEINPUT">TEST.CSV</Value> </WizardValues>
Best,
Jordan Barker
Solutions Consultant
Thanks Jordan.
I tried to implement as per suggested.
In the first attempt , I used FTSTeam.xlsx file in .xml file and its
content is as shown below:
MyAnalyticApp.yxwz
name="FILEINPUT">C:\Users\ynijapuram001\Desktop\FTSTeam.xlsx
In second attempt , I changed input file to FTS.xlsx and ran the command. I
can see the workflow is still considering the file we gave in 1st attempt.
MyAnalyticApp.yxwz
name="FILEINPUT">C:\Users\ynijapuram001\Desktop\FTS.xlsx
Kindly suggest.
Regards
Yashwanth
Hi @ynijapuram001,
I have attached a basic example for your consideration.
File MyAnalyticApp.xml contains both app name and parameter:
<WizardValues> <Module>CommandLineApp.yxwz</Module> <Value name="FileName">test.csv</Value> </WizardValues>
FileName is the name of the tool which is going to use value test.csv.
Result (creation of result.csv):
Kind regards,
Paul Noirel
Customer Support Engineer
I tried creating 2 appvalues.xml files with content as shown below in which
each file pointed to each different file.
However , when tried to run workflow from cmd prompt, irrespective of the
file name given in .xml file , workflow is getting executed as per the
initial design in the workflow.
*.xml file content:*
File-1:
C:\Users\ynijapuram001\Desktop\Yashtest.yxwz
C:\Users\ynijapuram001\Desktop\*FTS.xlsx*
command : C:\Program Files\Alteryx\bin>AlteryxEngineCmd.exe
C:\Users\ynijapuram001\Desktop\Yashtest.yxwz C:\Users\ynijapuram001\Desktop\
*AppValuess.xml*
File-2:
C:\Users\ynijapuram001\Desktop\Yashtest.yxwz
C:\Users\ynijapuram001\Desktop\*FTSTeam.xlsx*
command : C:\Program Files\Alteryx\bin>AlteryxEngineCmd.exe
C:\Users\ynijapuram001\Desktop\Yashtest.yxwz C:\Users\ynijapuram001\Desktop\
*AppValuess2.xml*
Screen shot of execution of two different .xml files where the data is
operating from only FTS.xlsx file in both the scenarios is attached.
--
Regards
Yashwanth
Hi @ynijapuram001,
Your screenshot -shared offline- shows the issue:
AlteryxEngineCmd will look for the value name mentioned in the xml file. Current error is caused by tool being named "File Browse (6)" instead of "Fileinput".
If you rename your File Browse tool to Fileinput, then your test will work:
New result - following change above:
Kind regards,
Paul Noirel
Customer Support Engineer
Thanks Paul.
I modified .xml file content as suggested by you changing Value Name in xml file
Value name="File Browse (6)"
cmd :
C:\Program Files\Alteryx\bin>AlteryxEngineCmd.exe C:\Users\ynijapuram001\Desktop\Yashtest.yxwz C:\Users\ynijapuram001\Desktop\AppValuess.xml
However , I can see the workflow is implementing for FTS.xlsx instead of FTSTeam.xlsx file.
Shared screen shot where data got retrieved from FTS.xlsx even though I updated .xml file with FTSTeam.xlsx file.
Please suggest.
Hi @ynijapuram001,
Action tool was not configured in the workflow you sent me.
Once fixed (with value name and file browse name set to "File Browse (6)") it is now working:
Kind regards,
Paul Noirel
Customer Support Engineer
Thanks Paul.
I read this and the solution looks fine, however parameters requires an Analytic workflow.
If you do not want an analytic workflow, then I have a (somewhat clunky) workaround as follows:
Now your workflow will run using that "dynamic" file.
There are drawbacks such as, the extra time to copy the file, the extra storage for the 2nd copy, the potential security exposure of having another copy, but it will work.