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.

Getting the workflow name using built-in formula/constant via the API

Harley
7 - Meteor

End goal: get the Message tools to output the workflow name rather than the .xml file name when Alteryx is called via the API through the Excel workbook.

I am running the Alteryx Designer using Excel and calling the Alteryx engine via the API (i.e. command prompt with settings). I do this via a VBA macro, which saves the key settings (e.g. the workflow name and the Excel workbook names) down to a file called APP_SETTINGS.xml then call the CMD which calls the Alteryx Engine to read the APP_SETTINGS.xml file.

 

In my workflow, I have Message tools that references [Engine.WorkflowFileName] which is a built-in constant. This works very well only if I execute the workflow inside it. When I run the same workflow using the method described above, I am getting "APP_SETTINGS.xml" as the [Engine.WorkflowFileName] output. 

 

Do people know how I can fix this, or if there is a workaround without having to manually type the workflow names out inside the Message tools?

3 REPLIES 3
TrevorS
Alteryx Alumni (Retired)

Hello @Harley 

Can you please provide your workflow and some sample data?
This will help the Community to troubleshoot what you have done so far and see what kind of options exist for your outcome.

Thanks!

Trevor

Community Moderator
Harley
7 - Meteor

@TrevorS Thanks for your response but I am not sure if actual workflow/Excel spreadsheet will help, as the description of the problem is pretty straightforward. 

 

The goal is to find a built-in function/constant that will give me the workflow(Macro, App, or Workflow) name being run, when the workflow is called via the Alteryx API using Excel VBA. 

The actual macro code is as the following, 

command_string = Chr(34) & "C:\Program Files\Alteryx\bin\AlteryxEngineCmd.exe" & Chr(34) & " " & Chr(34) & alteryx_path & Chr(34) & " " & Chr(34) & app_setting & Chr(34)
logging_string = Chr(34) & "C:\Program Files\Alteryx\bin\AlteryxEngineCmd.exe" & Chr(34) & " " & Chr(34) & logging_path & Chr(34) & " " & Chr(34) & log_setting & Chr(34)
Call create_run_powershell_script(command_string, log_full_path, logging_string)

 

And the APP_SETTINGS.xml is basically the text document

<WizardValues><Module>\\sharepoint\DavWWWRoot\Pricing Alteryx Hub\procedures\WORKFLOW.yxwz</Module><Value name="Run Controller UNC Path">\\sharepoint\DavWWWRoot\Pricing Alteryx Hub\procedures\EXCEL\Alteryx_run_controller_Demo.xlsm</Value></WizardValues>

 

jarrod
ACE Emeritus
ACE Emeritus

i haven't used the API through Excel, but it looks like you are passing through the workflow name at some point. Have you tried copying that and pushing it through using an app question? then just pull that through as a string all the way to the output?

Labels