Hi Matt,
in this case, we would recommend using config files, by defining a path to the config file (e.g. ~/.config/MyDynFolderConfig.json) within your Dynamic Folder script.
This config file can then be adjusted by each user to hold their personal configuration, since currently there is no option within the application to define user specific overrides, apart from credentials.
Alternatively, you can assign credentials via name to the Dynamic Folder (https://www.royalapps.com/go/kb-all-teamsharing), and select these via $EffectiveUsername/Password$.
Theoretically, this gives you the possibility to use these two fields for different purposes, but we recommend using the config variant, as described earlier.
I also attached sample Dynamic Folder scripts created by our lead dev, to give you a better idea of this.
I hope this helps!
best regards,
Christoph
Python - Config File Sample.rdfe:
{
"Name": "Dynamic Folder Export",
"Objects": [
{
"Type": "DynamicFolder",
"Name": "Python - Config File Sample",
"Script": "import json\nimport os.path\n\nconfig_file_path_unexpanded = \"~/my_dyn_folder_config.json\"\nconfig_file_path = os.path.expanduser(config_file_path_unexpanded)\n\nconfig = {\n\t\"name\": \"John\"\n}\n\nif os.path.exists(config_file_path):\n\tf = open(config_file_path, \"r\")\n\t\n\tconfig_file_content = f.read()\n\tconfig = json.loads(config_file_content)\nelse:\n\tf = open(config_file_path, \"w\")\n\t\n\tf.write(json.dumps(config))\n\tf.close()\n\njsonStr = json.dumps(\n\t{\n\t\t\"Objects\": [\n\t\t\t{\n\t\t\t\t\"Type\": \"ToDo\",\n\t\t\t\t\"Name\": \"You can adjust the config in:\",\n\t\t\t\t\"Description\": config_file_path_unexpanded\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"Type\": \"Credential\",\n\t\t\t\t\"Name\": config.get(\"name\", \"\")\n\t\t\t}\n\t\t]\n\t}\n)\n\nprint(jsonStr)",
"ScriptInterpreter": "python",
"DynamicCredentialScriptInterpreter": "json"
}
]
}
Python - Config File with Iterations Sample.rdfe:
{
"Name": "Dynamic Folder Export",
"Objects": [
{
"Type": "DynamicFolder",
"Name": "Python - Config File with Iterations Sample",
"Script": "import json\nimport os.path\n\nconfig_file_path_unexpanded = \"~/my_dyn_folder_iter_config.json\"\nconfig_file_path = os.path.expanduser(config_file_path_unexpanded)\n\nconfig = {\n\t\"iterations\": 5\n}\n\nif os.path.exists(config_file_path):\n\tf = open(config_file_path, \"r\")\n\t\n\tconfig_file_content = f.read()\n\tconfig = json.loads(config_file_content)\nelse:\n\tf = open(config_file_path, \"w\")\n\t\n\tf.write(json.dumps(config))\n\tf.close()\n\t\niterations = config.get(\"iterations\", 1)\n\t\nobjects = [\n\t{\n\t\t\"Type\": \"ToDo\",\n\t\t\"Name\": \"You can adjust the config in:\",\n\t\t\"Description\": config_file_path_unexpanded\n\t}\n]\n\nfor i in range(iterations):\n\tcred = {\n\t\t\t\t\"Type\": \"Credential\",\n\t\t\t\t\"Name\": f\"Credential {i + 1}\"\n\t\t\t}\n\t\n\tobjects.append(cred)\n\njsonStr = json.dumps(\n\t{\n\t\t\"Objects\": objects\n\t}\n)\n\nprint(jsonStr)",
"ScriptInterpreter": "python",
"DynamicCredentialScriptInterpreter": "json"
}
]
}