Make One User Input Depend on the Other

I've been playing around with this for a while and think it can probably be done. I just can't seem to do it. How can I make a user input change based on what a user chooses up above.

For example...

If a user chooses the source controller for a new volume to be: "testnas"

I want the backup controller to automatically change to "testnas2"

Any ideas? Maybe I'm going about this the completely wrong way.

Thanks in advance.

Re: Make One User Input Depend on the Other


I do not know the exact rules for how your backup controller is chosen based on source controller. Lets say its purely based on names (source controller suffixed by '2') going by the example provided above.

Assumption: User inputs for the controllers are named as "SourceController" and "BackupController"

You can write the query for the "Backup Controller" something in the lines of:

SELECT AS 'Array Name',

    array.ip AS 'Array IP',

    array.os_version AS Version



WHERE = CONCAT('${SourceController}', '2')



Re: Make One User Input Depend on the Other

Thanks Shailaja. While that solution would work for the example it won't accomplish what I'm trying to do overall. I just made up those NAS names for the example. I'll see if I can explain a bit better.

Each source controller is snapmirrored to a backup controller for disaster recovery purposes. The backup controller name is typically different from the source controller name so CONCAT will not do it.

Better Example:

If source controller is n1base01 then backup controller should be mtbase02

If source controller is ttbase01 then backup controller should be qtbase02


Thus I need to somehow do a "If source controller is this, backup controller equals this" kind of statement.


Re: Make One User Input Depend on the Other

Sorry. 10 minutes later I figure it out by just changing a small thing in Shailaja's query. Here is what I came up with if anybody else needs to do something similar.

Assumptions: $ArrayName is the variable for the source filer.


SELECT AS 'Array Name',

    array.ip AS 'Array IP'




'${ArrayName}' = ''

AND = ''


'${ArrayName}' = ''

AND = ''

Re: Make One User Input Depend on the Other

Another option would be to create a new dictionary/datasource ( and linking the arrays that way.  This would allow you to ultimately grow or have multiple 'potential' targets.  This would be a fairly simple data source to add and could be extended to have more 'resource pool' type of information.

Just my two bits,

Jeremy Goodrum, NetApp

The Pirate

Twitter: @virtpirate