There is an included function called splitByDelimeter. This will give you the ability to parse the volume name and then return the part that you want. In the example that you gave it would be: splitByDelimeter($VolumeName,"_",0)
Alternately, you could devise a VolumePrefix method and have that as a separate variable which would be combined with a type. I use this method to ensure naming conventions are adhered to when provisioning for applications. For example, if I am provisioning a data volume then the volumePrefix might be "goodrum_application" but the actual volume name is "goodrum_application_data" ($volumePrefix + "_data"). Using this method would allow you to create a Qtree named "goodrum_application_qtree" ($volumePrefix + "_qtree")
Jeremy Goodrum, NetApp
The Pirate
Twitter: @virtpirate
Blog: www.virtpirate.com