Alteryx Designer Desktop Discussions

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

How can I crate a relative output path via a formula

badavid
5 - Atom

Hi, since we moved to MS Teams we have to change all our input and output path to relative ones, so that all team members may use the same workflow. We have managed to change the general setting, but what is not working is the output path which we create with a formula toll. How do we have to set up the formula? I tried to find information inhere, but could not find it. Here is what I have tried: 

".\SF Risk\Q-Data\" + "Active clients " + [ExportQ] + " - Status " + DateTimeToday() + ".xlsx||Sheet1"  

 

Thank you for your help

Barbara

6 REPLIES 6
ericlt
6 - Meteoroid

I'll start with the assumption that you're trying to move up one (1) level in the directory and then traverse - I see a period at the beginning of the path. If that's the case, try two (2) periods at the beginning i.e., "..\SF Risk..."

afv2688
16 - Nebula
16 - Nebula

Hello @badavid ,

 

I see you are missing a pipeline in the end:

 

".\SF Risk\Q-Data\" + "Active clients " + [ExportQ] + " - Status " + DateTimeToday() + ".xlsx|||Sheet1"

 

Regards

badavid
5 - Atom

Dear both, thank you very much for your immediate reaction. I have added the second period and the third pipeline and now I get this error - the bold part is the individual part, that should not show up any more because :

Error: Output Data (72): Unable to Open archive for zipping: C:\Users\bdavid002\xxx\xxxx\xxx\SF Risk\SF Risk\Q-Data\Active clients Q1 - Status 2021-12-03.xlsx Error Opening file: C:\Users\bdavid002\xxx\xxxx\xxx\SF Risk\SF Risk\Q-Data\Active clients Q1 - Status 2021-12-03.xlsx
: The system cannot find the path specified. (3)

Thank you for your help

Barbara

Christina_H
14 - Magnetar

Try using [Engine.WorkflowDirectory] at the start of the formula instead of the period.

 

E.g. [Engine.WorkflowDirectory]+"SF Risk\Q-Data\" + "Active clients - Status " + DateTimeToday() + ".xlsx|||Sheet1"

(Removing the reference to a field I don't have!)

 

For an unsaved workflow, for me this outputs:

C:\Program Files\Alteryx\bin\SF Risk\Q-Data\Active clients - Status 2021-12-03.xlsx|||Sheet1

For a saved workflow it should use the folder the workflow is saved in.

badavid
5 - Atom

Dear Christina,

 

Thank you very much for this. It almost works fine now.

 

I have only one issue. We are organising our Alteryx data per process in different folders, so that for each process you will find a "Codes" folder (=the Altery Workflows), one "Input" folder, and "Interim" and an "Output" folder. 

The [Engine.WorkflowDirectory] therefore leads me directly into the "Codes" folder. Is there a way to go one level up, or do I need to create a subfolder with output data in the Codes folder? 

 

Thank you for your highly appreciated help 

Barbara

 

 

Christina_H
14 - Magnetar

@badavid I don't know a specific way to step up a level with this method (although one may exist) but if your folder is always called Codes then just wrap it in a replace formula - Replace([Filepath], "Codes\", "")

Labels