Subscribe

How to limit the values of one user input depending on the value of another?

Hi,

I want to be able to create a worklow where a user selects an array from a dropdown and then selects a volume for another drop down. Thing is that I want the second drop down to change its values depending on the value of the first.

The first drop down is a query that gives us options for $arrayName: -

SELECT array.name FROM storage.array

What I want to be able to do is essentially the following to give options for the $volName user input: -

SELECT CONCAT( vol.name, ' (', array.name, ')')

    FROM storage.volume AS vol

    INNER JOIN storage.array ON vol.array_id = array.id

    INNER JOIN storage.aggregate ON vol.aggregate_id = aggregate.id

    WHERE aggregate.name NOT LIKE'root%' # <- all root aggregates are prefixed with root

    AND array.name LIKE @arrayName

    ORDER BY vol.name

Sadly this doesn't work as $arrayName causes an error and @arrayName never gets populated by anything in the back-end and is therefore null.

Anyone have any ideas how to work around this?

Thanks,

Warren

How to limit the values of one user input depending on the value of another?

Hi Warren,

I have an answer for you, but not one you're going to like.  What you are attempting to do is not currently possible.

The ability to have queries to pull information from the WFA caching tables was added with the recent WFA 1.0.1 release.  The queries will pull from WFA cache at the time of preview.  The queries are not interactive.  All queries are done a time of preview / execution.  So you can get a list of distinct arrays, and also get a list of distinct volumes, but there is no way to make the list of volumes depend on which array was slected. At least not currently.

The WFA team is working on different methods for facilitating what I call "Interactive User Input", where the user input selection lists update depending on other user inputs.  Working on, meaning this is not something currently available.

There are two methods I can think of for getting closer to what you would like to accomplish

  1. Multiple workflows where you might be able to segregate / separate workflows by environment / location.  This would potentially give you smaller selection lists to use.  Also with the filtration capabilities within the user inputs, this might get you close.
  2. Custom Portal / Orchestration engine.  I know this is probably less desireable, but it's possible to use the NMSDK api's to do mult-layer user input.  The portal would first ask for the Array / location... or whatever it is you're looking for, and then pass that information to the next screen where you'd select the volume and provide the other user inputs.  From there you can pass all of those pieces of information via WebServices and initiate the appropriate WFA Workflow.

There may be other options available to you, but this is all I can think of at the moment.

Hope this helps,

Kevin

How to limit the values of one user input depending on the value of another?

Hi Kevin,

Thanks for the response. I assumed that it wasn't possible, but it is good to know that a more dynamic user input is being worked on.

At the moment I'm trying to replace Provisioning Manager with WFA. One of the problems we have with PM is the sheer number of policies that we'd need to achieve the flexibility we need. It won't look good to replace lots of policies with lots of workflows

Regards,

Warren

Re: How to limit the values of one user input depending on the value of another?

Any news regarding a more interactive user input ?

Re: How to limit the values of one user input depending on the value of another?

Hello Francesco,

Yes. There are several improvements made to handling user inputs in release 1.1 (Due March 2012):

1) Unlimited cascading inputs, allowing the output of one to be an input to the next (Most relevant for using queries)

2) Allowing validation checks on strings (Based on regular expression) and numbers (Based on target range)

3) Locking values of drop downs, making the user select a value from them (Currently all drop downs are open to additional values)

Please let me know if that answers the question.

Regards,

Yaron

Re: How to limit the values of one user input depending on the value of another?

Hi Warren,

Please see my answer to Francesco (Quoted below). Does that answer the original question?

>>>>

Hello Francesco,

Yes. There are several improvements made to handling user inputs in release 1.1 (Due March 2012):

1) Unlimited cascading inputs, allowing the output of one to be an input to the next (Most relevant for using queries)

2) Allowing validation checks on strings (Based on regular expression) and numbers (Based on target range)

3) Locking values of drop downs, making the user select a value from them (Currently all drop downs are open to additional values)

>>>

Regards,

Yaron

Re: How to limit the values of one user input depending on the value of another?

Those will be all really nice features the possibilities to get into a storage, choose an volume and then for example choose a snashot will be really nice to have.

Another things that can be good is the possibility to have input "checkbox" for value that can be true or false.

Re: How to limit the values of one user input depending on the value of another?

We don't have checkboxes yet but are looking at them.

Alternatively, you can use an enumerated user input to be "true,false". In 1.1 you can lock it so it can be only one of these two, same as a checkbox.

Yaron