visibleIf

Greetings,
I’m trying to write a plug-in, but I having issues with the “visibleIf” statement. See code below. If “PGMod” is set to zero it should draw a slider for “PGAmp”, but is does not. Removing the “visibleIf” statement the slider is drawn and operates as expected.

The goal is to have two slider with different ranges based upon the vale of "PGAMod".

I am not a coder by nature, but can write snippets if I understand what is going on.  Any suggestions would be greatly appreciated.

Thanks,
Randy

[code]{
“id”: “PGAMod”,
“element”: “select”,
“label”: “PGA Mode”,
“description”: “Select Programmable Amplifier mode. Default = 4db-increments”,
“doc”: “Select Programmable Amplifier mode. 1db or 4db increments. Default = 4db-increments”,
“value”: {“value”: 0 ,“label”: “4db - Default”},
“options”: [
{
“value”: 0,
“label”: “4db - Default”
},
{
“value”: 1,
“label”: “1db”
}
]
},
{
“id”: “PGAmp”,
“element”: “equalizer”,
“label”: “Programmable Amplifier”,
“description”: “Programmable Amplifier acts as a volume control. Default = 0 (no change to audio volume)”,
“doc”: “Programmable Amplifier acts as a volume control. Range is -15 to +15. Default = 0 (no change to audio volume)”,
“config”: {
“orientation”: “horizontal”,
“bars”: [
{
“min”: -15,
“max”: 15,
“step”: “1”,
“value”: “0”,
“tooltip”: “always”
}
]

        },
        "visibleIf": {"field": "PGAMod", "value": 0}
        
    }[/code]

Greetings,
If I can’t fix the hide function, is it possible to pass a variable from “index.js” to “UIConfig.json”?

 For example the slider parameters listed below:

{ "min": -15, "max": 15, "step": "1", "value": "0", "tooltip": "always" }

 Can I replace the "min", "max" and "value" field's values with variables "PGAmpMin", "PGAmpMax" and "PGAmpValue"?  See code snippet below:

{ "min": "PGAmpMin", "max": "PGAmpMax", "step": "1", "value": "PGAmpValue", "tooltip": "always" }

Thanks,
Randy