Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Engine.WorkflowFileName in chained apps vs macro

hhart
6 - Meteoroid

Hello,

 

I am using Version: 2021.3.5.03604 and finding that the value of engine.workflowfilename changes depending on from where it is referred to.  Attached is an app A which is chained to app B.  Both app A and app B contain macro C.  I was hoping to use these workflow variables to make it easier to rename / move them.  Is this expected behavior?  

 

 

 

 

 

4 REPLIES 4
KilianL
Alteryx Alumni (Retired)

Hi @hhart ,

 

not sure if this is expected behavior. What do you want to do with the workflow name?

To work around the ".\" for the chained app, a simple formula will do the trick, e.g. trimleft([b_EQFN],'.\').

For the macro, do you want to know the macro name or what is needed here?

hhart
6 - Meteoroid

Hello KilianL,

 

Thank you for your reply.  In my situation, I would like to use the macro name to determine what source file to input. When I realized it Alteryx was returning the app name, that was fine until I realized it changed depending on whether I ran it from app A or from app B alone.  (App A doesn't always need to be run.) Macro c above is just to display the behavior, but my real macro has an action tool that will update the input path/filename like this:

 

'.\'+left([Engine.WorkflowFileName],findstring([Engine.WorkflowFileName],'.'))+'==MasterCost.xlsx|||Sheet1'

 

This helps me keep all my associated apps, macros, inputs and outputs similarly named.

KilianL
Alteryx Alumni (Retired)

Hello @hhart ,

 

looks like the filename in the macro is being picked up from the main workflow it runs in and not the macro itself. Is it an option for you to hardcode the macro filename inside the macro? E.g. '.\Macroname'+'==MasterCost.xlsx|||Sheet1'. Assuming you don't change the macro name later, this could be a workaround.

 

Kind Regards,

Kilian

hhart
6 - Meteoroid

Would prefer not but at least I understand how it works now. Appreciate the help, thanks!

Labels