community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

How to export messages from the results window

Hello - Does anyone know how to export the message (log) from the results window and use it as a input within the current canvas? Thanks

Hi @Sauravdugar! Can you provide more details on what you're trying to do/why with the message? My best suggestion would be to use the runner macro (part of crew Macros). You could have to split up your workflow into 2+ parts: The first part module would be generating the message(s) that you want to read in later. The second module would then start with the runner macro.You would configure the runner macro to run your first workflow. The output from the runner macro would then contain the log info you need. The crew macros also contain the log parser to assist with parsing the log field.

 

Hope that helps!

Atom

I would like to do this too - My end goal is to union the results of all my overnight workflows and create a tableau dashboard with the high level details, individual tool results that I would like to keep an eye on and the timelapse between tools in a more graphical form so its easier to pinpoint anything unusual - similar to a tableau performance recording if you have ever seen one. 

 

 

Something like this:

 

Alt Log Example.png

So I thought this would be easier than it is, but I think I'm a little closer to your result (and still missing a key component).

 

Using Events (accessible by clicking on the workflow canvas, then clicking the "events" tab in the configuration window) you can automate a "Run Command" or "Send Email" to fire at the end of your workflow.  If you click the "Add" button and select email, you can see there are a series of global variables that are replaced by the engine at runtime (all of them are set off by % on both sides)

 

Capture_addeventemail.PNG

 

The variable %OutputLog% will contain the entire results window in it, which is what you would need to find a way to save.  Conveniently, the "Run Command" even also permits you to use those same variables.  If you want to write the module name to a text file once the workflow completes, you could set up the following:

Capture_runcommand.PNG

 

This will write the module (workflow) filename to the file E:\text123.txt.  The problem I have is that I don't know enough about working with the command prompt to be able to export a multilined string of text (e.g. the %OutputLog% has a new line character in it, and won't echo any more than the first line.  It also seems to just execute the echo and not the write to file, likely because the carriage return is being interpreted as an enter key and executing the command early).  I'm stuck at this point, so hopefully someone else can add on here.

 

Some things about that command:

  • cmd.exe is the "command prompt" executable file
  • /C is a parameter to just execute the following text and close the window (use /K to execute but keep the window open)
  • "echo %Module%" echo is the command to print text back to the command prompt (open one up and type echo hello!)
  • > is a command to take the results of the previous command and write them to a file, overwriting if necessary (>> will just append a row).

Also note that whatever location you write your file to needs to be mapped within the command prompt environment, even if its mapped in windows.  To check, just go to a command prompt window and try the drive letter followed by a colon (e.g. "if E:" takes you to the E drive you are good to go, if not you'll need to map it using net use)

Hi there, I've been trying to use the command line arguments to save the messages, however I want to save it in the same folder as my output files. This folder changes depending on certain conditions in the workflow. Is there a way to to do this within the workflow and not through workflow properties?

Atom

Will the command prompt method work on the scheduler (if its not located on our own machines) ? 

Asteroid

I would like to do the same as @mchan12345. Is this possible? Or has this been answered elsewhere?

Meteoroid

Hey,

 

Did anyone find a solution for the following problem?: 

 (e.g. the %OutputLog% has a new line character in it, and won't echo any more than the first line.  It also seems to just execute the echo and not the write to file, likely because the carriage return is being interpreted as an enter key and executing the command early)

I still haven't figured out a way to export the result window to a text file.

Bolide

I posted info on capturing the log info a variety of ways for analysis and reporting.  please follow link to other post

https://community.alteryx.com/t5/Setup-Configuration/Log-File-Location-and-Variables/m-p/80884/highl...

Hi fharper,

 

I took a look at your post but it was not much helpful to me. Can you please explain how can I write %OutputLog% into a text file using Events's run command.

Labels