In a catalog item, is there any way to automatically select the group to provision to if only one exists, or based on the name (rather than ID)?
The group name is known (and is consistent between tenants), but it seems there’s no way to configure a default group ID for an input, since each tenant has unique group IDs.
It’s frustrating as it’s another option list we need to show on a form which (for us) doesn’t serve any purpose and can’t be auto-selected.
We have the same issue with resource pool selection - a tenant usually only has one RP to choose from but the option list can’t be configured to default the selection based on the name.
It would be great if a required option list, that only has 1 option to choose from, could have the option to just default to that value.
Depending on what version of Morpheus you are running you can try a few things. I believe in 6.1.x we default to the first value in the select list at least that’s what I’m seeing in 6.1.2 I can then take that a step further and if i don’t want it displayed to the user set the visibility field to something that will never validate. testing a catalog item in multiple tenants it auto selects the single group without a user ever selecting a group option.
For older versions of Morpheus you can try the below.
Set the input to required and also set a default value of something that is not valid. This should force the selection to the first item in the list.
I tested this in 6.0 and was able to get it to display the first value in the list by default.
you could then try the same visibility trick above, if you don’t want it displayed.
Hope that helps.
Ah, 6.0.4 is what we’re running but the invalid default value is a clever workaround so that might work for us - thanks!
Just catching up, but if you set an input as required and only 1 item is returned in the list that will always be autoselected.
That isn’t the case in our 6.0.4 installation, but setting a default value (even if it was invalid) DOES automatically select the single value in the list as per @rboyd 's suggestion.