We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Failing to get the workflow variable in python code

Mohammad-Usama
5 - Atom

I am using python to do some formatting and later saving the formatted excel to a path. This path is stored in a variable called "filepath" in a formula pane. It's throwing error while trying to to get this variable inside the python code.

 

AttributeError: module 'ayx.Alteryx' has no attribute 'getWorkflowVar'

 

output_file_path = Alteryx.getWorkflowVar('filePath')

1 REPLY 1
PhilipMannering
16 - Nebula
16 - Nebula

There's no method 'getWorkflowVar'. If you have your Formula Tool connected to the Python Tool then something like this should work,

filepath = Alteryx.read('#1').loc[0, 'filepath']
Labels
Top Solution Authors