Dev Space

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.

Accessing React Front End Variables in Python Backend

paul_houghton
12 - Quasar

Im trying to use the platform SDK to create a python macro. I have initialised a new virtual environment to develop in but I don't know to access values entered in the react front end (eg a text box) in the python engine backend.

Any assistance in filling in the missing pebkac error would be fantastic.

1 REPLY 1
PetrT
Alteryx
Alteryx

Hey Paul,

you can simply use 

provider.tool_config.get("ValueName")

as you can see in AyxSdkInput tool example, or you could also refer the AyxSdkComplex example for more sophisticated solution. These sample tools are part of ayx_python_sdk package, so you can find them in your workspace's virtual environment eg.: ..\venv\Lib\site-packages\ayx_python_sdk\examples\