HPE Morpheus Enterprise Software
1856403 Members
7889 Online
104112 Solutions
New Discussion

Re: Using Inputs To Set Other Inputs in Morpheus

 
Not applicable

Using Inputs To Set Other Inputs in Morpheus

An interesting question came up with how to use one input to define multiple other inputs. It was a little more complex than I initially thought, but there were a couple of solutions to the problem.

One was to define many values in the first option list dataset:

production,stable|1.4
dev,develop|2.0

To get one of the subvalues, use something like this to split on the |:

customOptions.clustername.tokenize('|')[0]

Depending on the complexity and number of values you need, you may want to define separate inputs for the other values. Since that is a longer topic requiring screenshots, I posted it to my blog here.

2 REPLIES 2
cbunge
HPE Pro

Re: Using Inputs To Set Other Inputs in Morpheus

Nice! I use this trick all of the time for things like selecting a layout. Sometimes I want the layout id, code, and version so I can map 1 selection to multiple locations within the Service Catalog spec. Tokenize delimiting on a ‘|’ allows me to do this. (I even do the same with dependent/waterfalling drop downs!)

Not applicable

Re: Using Inputs To Set Other Inputs in Morpheus

I love this trick. Like @cbunge I use it whenever I need to handle multiple values from a single input.