Dear all, I'm wondering what is the best practice for passing the Question type Constants into Python tool?
1) If I refer the Question type Contants by wrap it in %, unlike the R tool, the Python tool show errors. Even though it works, the error msg is annoying, and according to the Python Tool documentation, wrapping it in % is not the best practice and can have unexpectted outcomes.
2) Workflow Constants, can be directly referred(see Pic)
3) I found a way to fix the problem, but i think it's not the elegant/right way.
Thanks
Solved! Go to Solution.
Hello @dylan_gao
I found this post in the Community and I hope this will help you out!
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Use-Question-lt-name-gt-in-Python/td-p...
Thanks!
TrevorS
Hi TravorS, thanks for sharing the post. I have the exactly the same questions.
I knew there are ways to tackle it, but i'm wondering is there any best practice on this?
Thanks.
Hello @dylan_gao ,
When it comes to best practices with python we tend to suggest the same best practices of python itself. So it is mostly about knowing what the data structure/type are that you are working with.
Perfect, got it. Many thanks, Matthew. I'll accept your answer the solution now.
I'm also like to thank @TrevorS for helping me on the problem.
Cheers,
Dylan