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

Dynamically representing the name of the macro running

Scott_Snowman
10 - Fireball

I'm tracking utilization of macros in a library I'm developing by writing a record to a database every time a macro is called. I do this by adding tools to the end of the macro that push a record to a database table for this purpose.

 

The record contains an expression "[Engine.WorkflowDirectory] + [Engine.WorkflowFileName]" to collect the macro's parent workflow details, and hard coded string fields representing the macro's file name and directory path.

 

Even when the macro is doing the writing to the database, the [Engine] constants still refer to the workflow details of the parent workflow, not the workflow details of the macro itself.

 

I'm hoping to make this truly automated and move away from needing to configure the hard-coded strings every time I drop these tools into a new macro. But I can't figure out how to dynamically access the file name of the macro itself without the [Engine] constants being available.

 

Any suggestions?

3 REPLIES 3
JoeS
Alteryx
Alteryx

Interesting problem....

 

As the constants are for the workflow I am not sure you can get around them being anything other than that. That's the metrics passed through to the engine. 

 

However, I'll ask a question, does it matter where the macro is stored? Could you hard code the macro name, and then log the workflow (it's full path location) itself. And is that not more valuable than just the macro full path?

 

 

Scott_Snowman
10 - Fireball

Hi @JoeS , I am hard coding right now. It works, but I'd ideally love to track location dynamically. That way I can check on the actual network location of the macro to prevent any unexpected forking and hopefully have better version control.

 

Edit for clarity: in the event a macro is forked and moved elsewhere, the hard-coded values may not be updated by whoever changed the macro itself. In that case, I would lose visibility to the new location of the forked macro because it would still push the old location.

JoeS
Alteryx
Alteryx

@Scott_Snowman wrote:

Hi @JoeS , I am hard coding right now. It works, but I'd ideally love to track location dynamically. That way I can check on the actual network location of the macro to prevent any unexpected forking and hopefully have better version control.

 

Edit for clarity: in the event a macro is forked and moved elsewhere, the hard-coded values may not be updated by whoever changed the macro itself. In that case, I would lose visibility to the new location of the forked macro because it would still push the old location.


I understand the problem you have. Currently I can't think of a great solution to it, due to the flexible nature of Alteryx.

 

You can lock down macros, by encrypting them, but then lose that flexibility.

 

We can see if anyone else has faced similar and managed to work around it.

Labels