I have my parameter values in a SQLite table. I am able to access each value though a Python scripted parameter that opens the table and retrieves the value. However, this means that I have to open and close the SQL table one time for each parameter. Is there a way to make multiple parameters that can be read by the readers and transformers, perhaps in the Python startup script?
Solved
Create Multiple Parameters in Scripted Python Parameters
Best answer by takashi
Hack. You can define the dictionary as a global variable which can be accessed while FME is configuring user parameters. e.g.
First scripted (Python) parameter:
global a
a = {'ap':'apple','ba':'banana','ch':'cherry'}
return a['ap']
Second scripted (Python) parameter:
return a['ba']Third scripted (Python) parameter:
return a['ch']Note: A global variable defined in a scripted (Python) parameter can be used only in scripted (Python) parameters. It cannot be used in the Startup/Shutdown Python script, PythonCreator, and PythonCaller in the workspace.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.


