Hello Alteryx community,
I have a flow that reads data from a csv file and passes it to the Python tool to run a script.
The script needs an input value from the user - a simple: main(root_id='11111') where '11111' is currently hardcoded.. How do I make this flow an app that takes the input from the user and passes it to the script? Also, can I pass an error message back if the user input is invalid? Right now my script is writing the output to excel directly via xlsxwriter, I am not using Alteryx output tool and I can't use the row counter to identify a non valid entry, the script just prints an error message if the input is invalid- is there a way to send it to an error pop up for the users directly from the script? I would prefer not to use the output tool because I am dealing with a very dynamic set of columns that need to be arranged in a particular custom order based on their combination in the output, it would be difficult to re-create that logic in Alteryx.
I would appreciate any ideas
Thank you!
Solved! Go to Solution.
hi @OJet
As far as I know, Python tool does not accept variables [#1], [#2] from Interface tools, so you can create another text input tool, and configure interface on it, then you can indirectly accept user input value.
As for error massage, I'm not sure how to indicate error message. But I can suggest to have Drop Down type interface, and configure predefined input values in it, and let users select input from drop down menu, then invalid input would not happen. This is simple way, I guess, try it out if it sounds OK.
Thank you!