Conditional options?

Could someone help me with this? I’m trying to get an enum of options to vary in a dynamic page according to previously selected options, such as something like this:

 if(MoreExceptions){
                def Therm1AlreadyTaken = Thermostat_1 in Particular
                def Therm2AlreadyTaken = Thermostat_2 in Particular
                def Therm3AlreadyTaken = Thermostat_3 in Particular
                def Therm4AlreadyTaken = Thermostat_4 in Particular
    
                   input(
                   name: "Particular2", 
                   type: "enum", 
                   if(!Therm1AlreadyTaken){
                   options:["$Thermostat_1", "$Thermostat_2", "$Thermostat_3", "$Thermostat_4"],
                   }
                   
                   title: "which units will have different sets of temperatures", 
                   required: false, 
                   multiple: true, 
                   submitOnChange: true)

I suppose I’d rather create an array here, shouldn’t I? something like this:

def ThermAlreadyTaken =
thermostats.Particular.each(){
ThermAlreadyTaken += it.name
}

As you may see, I’m kinda lost! :slight_smile: Usually I only need a little kick start to figure it out, so you can be brief.