Alteryx Designer Desktop Discussions

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

Output Data keep the old location after copying to a new location

mathias_schnoor
11 - Bolide

Hey,

 

I have build a macro, the macro wrote files, among other things.

 

The file path from the Outpu Data Tool is relative.

 

The I inserted the macro to a Workflow.

I save the Workflow to the same folder.

All file are in the same folder.

I run the Workflow. It works fine.

 

Then I copy the folder to a new location. Open an run the Workflow.

I have a look to my written files.

Nothig happens.

 

Then I have a look to the message menu of my inserted macro.

 

The message is: <the file was written to the old filepath location>.

 

Where is the bug or feature?

 

Mathias

 

5 REPLIES 5
dataMack
12 - Quasar

It sounds like within the macro, you set the output to be relative (ex. files will be written to same directory that the macro lives in).  On top of this you created a workflow that calls the macro and when you move that workflow to a new location, the files still get written to the same location.  This is likely because the macro is still in the same (old) location.

 

Or are you saying you've copied both the workflow that calls the macro, and the macro file itself, to a new location, but it continues to write to the old spot?

michael_treadwell
ACE Emeritus
ACE Emeritus

Try using workflow constants.

 

In the macro that writes the output, instead of using a relative path, use %Engine.WorkflowDirectory% followed by the name of the file. In the example below, the file is temp.yxdb

 

Capture.PNG

 

This will dynamically update the output tool in the macro to write to the directory of the workflow in which it is used.

mathias_schnoor
11 - Bolide

Hey Jason,

 

thank you for your support.

the Workflow file

the Macro file

all in the same folder.

I insert the Macro to the Workflow. It works fine.

 

I copy th whole folder to an other location.

 

 

The feature is that the inserted macro itself keep his old location file path after copy the folder to another location.

 

It is possible to set the Macro file path relativ by inserting?

 

Mathias

 

 

mathias_schnoor
11 - Bolide

Hey Michael,

 

thank you for your support. It works only if all files in the same directory.

If I have more then one folder, it does not work any more.

 

The feature seems to be that the inserted macro itself keep a absolute file path.

So that the path of the macro is still the same after copy the folder to an anther location.

 

Bug or feature?

It is possible to set the inserted macro to a relative file path?

 

Mathias

mathias_schnoor
11 - Bolide

Hey Michael, Jason,


O.K it is a feature:


I have found the setting to set the inserted macro to a relative file path:

Menue Options>> Advanced Options>> Workflow Dependencies

workflow_relativ_filepath.PNG

 

That solve my problem.


Mathias

 

Labels