Forum Discussion
Is it possible to pass a parameter to a python script?
- 5 years ago
I assume you are doing this as part of your query (instead of through a Python visual, in which your parameter wouldn't get passed). Does it work with you hard code in a file name? If that is working, I would edit the M code in the Advanced Editor instead of in the pop-up window. There you should be able to replace the hard-coded filename with "&File&" (I assume the whole Python code is surrounded in double quotes in Advanced Editor and this will break it apart and insert in your paramter value.
Regards,
Pat
I assume you are doing this as part of your query (instead of through a Python visual, in which your parameter wouldn't get passed). Does it work with you hard code in a file name? If that is working, I would edit the M code in the Advanced Editor instead of in the pop-up window. There you should be able to replace the hard-coded filename with "&File&" (I assume the whole Python code is surrounded in double quotes in Advanced Editor and this will break it apart and insert in your paramter value.
Regards,
Pat
- carlpaul1535 years agoHelper I
You are completely right mahoneypat ! thank you very much!!!