Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Solved: Create app that takes user text input to modify and run Windows batch command

samuelp
5 - Atom

I manually re-added the response I received which led me to the solution and wanted to at least represent his contribution. Don't understand why his actual response seems to have vanished!

 

5-Sep-2019 18:30 GMT:

Hello community. My first post, and newbie to Alteryx. I could be biting off more than I can chew but I need to get this app working and have searched endlessly and haven't been able to piece together a working tool yet, but feel I am close (hopefully!).

I have create an app with five Text Box inputs and one File Browse input. These all have Update Value actions to Replace a specific string (six variables in a Windows batch file, which initiates the SnowSQL (Snowflake) command line interface and runs the query). After the Text Input I have a Select tool, then an Auto Field tool, all sequential. Up to this point it works great. The barrier I can't seem to get past is getting Alteryx to rewrite the batch command using the user inputs and run it via command line. I have attempted to use the Run Command tool but can't get it to do what I need. Any ideas? I've attached a generic copy of the app saved as a workflow (couldn't upload yxwz file for some reason). Thanks in advance for any assistance!! -Samuel

 

 

Just minutes after original post:

Hello samuelp,

benakesh (Asteroid) mentioned you in a post! Join the conversation below:

Re: Create app that takes user text input to modify and run Windows batch command

Hi @samuelp ,

In  run command  tool enter  a  file name  for   " Write source Output "   ex   :   run.bat .   

In run external command  enter  this file name  i.e  run.bat .

If  there are errors  you can check  this  batch ( run.bat)  to make sure the syntax is correct and you can run  this batch  file from  windows  command prompt. 

Reply | Accept as Solution | Give Stars

Thanks for being a Alteryx Community member.

Your Alteryx Community Team

 

5-Sep-2019 22:36 GMT:

Thank you @benakesh! The tricky part was ignoring Alteryx's insistance that the Write Source-Output field be some sort of data type, no plain text option, and switching the Save as type: to All Files(*) and entering the name of the .bat file. The strange thing is I tried this solution a couple days ago but was unsuccessful. Thanks again @benakesh.

1 REPLY 1
benakesh
12 - Quasar

Hi @samuelp ,

In  run command  tool enter  a  file name  for   " Write source Output "   ex   :   run.bat .   

In run external command  enter  this file name  i.e  run.bat .

If  there are errors  you can check  this  batch ( run.bat)  to make sure the syntax is correct and you can run  this batch  file from  windows  command prompt. 

Labels