Best practice to call Parameter set for preset password

Options
NN
NN Neuron, Registered, Neuron 2022, Neuron 2023 Posts: 145 Neuron

Hi All,
I have a Parameter set (paramset1) where i have defined a preset password (presetpass).
In my custom macros runnnable.json i define a parameter (preset_groups)
and assign the ParameterSetId to paramset1

{
"name": "preset_group",
"label": "Preset Details",
"type": "PRESET",
"parameterSetId": "paramset1",
"mandatory": true
}


I then call the presetPass in my runnable.py.

preset_params = self.config["preset_group"]
preset_password=preset_params.get("presetpass")


My question is, can the parameter (preset_groups ) be hidden in my runnable.json
The users donot need to change this password while running the Macro

or is there any other way to call the preset password in the python code without having to show it as a parameter in the runnable.json.

Best Answer

  • Alex_Combessie
    Alex_Combessie Alpha Tester, Dataiker Alumni Posts: 539 ✭✭✭✭✭✭✭✭✭
    Answer ✓
    Options

    Hi,

    Technically, you can hide the parameter by using a visibilityCondition. However, it means this parameter will no longer be editable, so all users will use the same password.

    Note that you can disable the possibility for end-users to add their own preset here, by deactivating the "Definable inline" and "Definable at project level" buttons:

    Screenshot 2021-05-03 at 13.39.03.png

    Hope it helps,

    Alex

Answers

  • NN
    NN Neuron, Registered, Neuron 2022, Neuron 2023 Posts: 145 Neuron
    Options

    Visibility condition was such a simple solution. dont know why i was complicating things. Thanks Alex.

Setup Info
    Tags
      Help me…